Can you write a file to disk or hard drive using php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
KG
Forum Newbie
Posts: 8
Joined: Tue Sep 26, 2006 4:11 pm
Location: Lexington, KY / Huntsville, AL

Can you write a file to disk or hard drive using php?

Post by KG »

Is it possible to write a file to disk or hard drive using php? I need to create a .txt file and save it to either the desktop or C:\ directory if possible. Actually, I don't even need to create one, I could just edit an existing one. Any help would be greatly appreciated.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

You can write files to the place where PHP is running (the server), but not to the client (the browser).
Post Reply