PDA

View Full Version : file edit on server[PHP]



jazzman121
September 27th, 2003, 10:20 AM
ok what if i used ftp with user name and password to edit say a text file would it make things slower??



$handle = fopen ("ftp://user:password@example.com/somefile.txt", "r+");

say i had a text file on my server and a page that users can come to and add text into the text file but i dont want to make the text file(chmod) read/write to all users ... can i use this in the php thus making it safe coz users wont get the password ... but will it be slower or anything coz its accessing via ftp?? just wondering

hope that makes sense

Jubba
September 27th, 2003, 10:47 AM
would that even work? I thought that you would still have to chmod it for that to work... I could be wrong tho... never really tried it with FTP...

jazzman121
September 27th, 2003, 11:06 AM
i mean why would u have to chmod coz the user name and password is there soo it goes to the ftp as the admin( or user with admin rights )