I've been reading up and found the fopen, fwrite, fclose, fread, etc commands but is it possible to actually create files using php?
| SitePoint Sponsor |
I've been reading up and found the fopen, fwrite, fclose, fread, etc commands but is it possible to actually create files using php?
Yes, if the file does not exist fopen will create it.


from the table in the manual page....
'w' Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.Off Topic:
good username
Mike Swiffin - Community Team Leader
Only a woman can read between the lines of a one word answer.....
I started out with nothing... and still got most of it left!


from the table in the manual page....
'w' Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.Off Topic:
good username
Mike Swiffin - Community Team Leader
Only a woman can read between the lines of a one word answer.....
I started out with nothing... and still got most of it left!
Thanks guys.
I was doing something silly which made me think fopen wasn't working for this purpose. It's cleared up now though. Thanks again.
Bookmarks