NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·Need An Install
·Uzbek Language
·Cut and Pasting of Source Code.
·MYSQL ERROR HELP ME PLEASE
·does 7.9 not have a CAPTCHA (security code)?
·HTML Code Not Posting Properly
·Phorum module?
·Header not working....
·registration error
·Romanian SEO Agency??

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: softdrpu
Today: 0
Yesterday: 4
Overall: 15040

Visitation:
Guests: 443
Members: 0
Total: 443


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Nuke Sites Link Directory
Nuke Sites Link Directory

NukeResources :: View topic - How can I append info to a ini file
NukeResources Forum Index

NukeResources Forum Index -> PHP -> How can I append info to a ini file
Post new topic  Reply to topic    View previous topic :: View next topic 
How can I append info to a ini file
PostPosted: Wed Jul 02, 2003 1:48 am Reply with quote
osward
Resource Seeker
Resource Seeker
 
Joined: Jun 26, 2003
Posts: 3




Hi, everyone

I want to add user to my ftp server users.ini file automatically when user register at my site

I am testing this on a test script but it does not write and/or append info the the users.ini file

Here is what I did:
Code:

<php?

$fr = fopen ("e:/www/G6_FTP_Server/users.ini", "a+");
   if (!$fr)    {
   echo ("Error! Could not open File");
   exit;
   } else   {
   fputs ('e:/www/FTP_Server/users.ini' , "[$username]\n");
   fclose ($fr);
   }
   if (!fclose ($fr))   {
      echo ("Error! Could not close File");
   }

?>


Actually the data I want to put into the users.ini is not just one line I want to define a $NewUserData as follows:
Code:

$NewUserData = "[$username]\n"
. "Login=$username\n"
. "Pass=$password\n"
. "Hide Hidden Files=1\n"
. "Home-Ip=-= All IP Homes =-\n"
. "RelativePath=1\n"
. "TimeOut=600\n"
. "EnableMaxConPerIP=1\n"
. "MaxConPerIp=1\n"
. "MaxUsers=0\n"
. "RatioMethod=0\n"
. "RatioUp=1\n"
. "RatioDown=1\n"
. "RatioCredit=0\n"
. "QuotaEnabled=1\n"
. "MaxSpeedEnabled=1\n"
. "MaxSpeedRcv=999999999\n"
. "MaxSpeedSnd=999999999\n"
. "QuotaCurrent=0\n"
. "QuotaMax=10000000\n"   
. "Dir0=$FTPRoot\$username\\n"
. "Attr0=RWDAMLSK\n"   
. "Stat_Login=0\n"
. "Stat_LastLogin=12/30/1899\n"
. "Stat_LastIP=Unknown\n"
. "Stat_KBUp=0\n"
. "Stat_KBDown=0\n"
. "Stat_FilesUp=0\n"
. "Stat_FilesDown=0\n"
. "Stat_FailedUp=0\n"
. "Stat_FailedDown=0\n"";


Can I replaced the orginal with:
Code:

fputs ('e:/www/FTP_Server/users.ini' , $NewUserData);


However, no matter which way to go, I have to make it append the data to the users.ini first. Please help!

Thank you in advance for the time

Regards,
View user's profile Send private message
How can I append info to a ini file
 NukeResources Forum Index -> PHP
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 4 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic     



Powered by phpBB © 2001-2005 phpBB Group.     Theme created by Vjacheslav Trushkin.
There have been 148 unique hit(s) in the past 24 hours.
Forums ©
Nuke Sites Link Directory


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.33 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::