Hello,
I have a script which uses mkdir() to generate user folders on registration, is there a similar function for file creation? I would like the script to create a redirect file for the folder generated by mkdir() upon user registration, any ideas?
Thanks,
Jason
Automating redirect file creation
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: Automating redirect file creation
Sure, use fopen() and fwrite().
fopen() creates the file and opens it as a resource
fwrite() will write a string (file contents) to a resource (the one created with fopen())
The example given for fwrite() is pretty straight forward and shows usage of fopen and fwrite
http://us2.php.net/manual/en/function.fwrite.php
fopen() creates the file and opens it as a resource
fwrite() will write a string (file contents) to a resource (the one created with fopen())
The example given for fwrite() is pretty straight forward and shows usage of fopen and fwrite
http://us2.php.net/manual/en/function.fwrite.php