writing file question

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
thegreatone2176
Forum Contributor
Posts: 102
Joined: Sun Jul 11, 2004 1:27 pm

writing file question

Post by thegreatone2176 »

well I am doing a project and the way it works is taht the client uploads a .txt with comma seperated values and i made a script to read from it using fgetcsv() and it creates the xml values i need. The problem is that i thought i just needed to output it but i need to write this variable to a .xml file. I tryed using fopen and w and w+ and got permission denied, so is there another function to create the file. I looked through all the functions on php.net under filesystem and did not seem to find what I needed. Also it does not matter if the function will error if the file exists becasue i can unlink the file first before writing if needed.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Your permissions are not set. If you are using IE for ftp, right click the filename and check write for All Users.
Post Reply