writing file on server from database?
| From: | raisinlove | Date: | Wed, 03 Mar 2004 09:39:12 +0000 |
| Subject: | writing file on server from database? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-179334@lists.php.net to get a copy of this message | ||
Hi, I'm currently working on a basic website creation script where I want an index file created automaticaly within each new folder created.
My attempts at using copy() were foiled by safe-mode restrictions on my account but after some research, I discovered this could be circumvented with the use of move_uploaded_file() instead.
Now I'd like to figure out how I could use this to copy an existing "index.php" file on the server to the newly created directories.
But can I use move_uploaded_file() if the file is already on the server? If it needs to be an uploaded file, would uploading it once allow me to copy it anytime afterwards?
I figured an even better solution could be to store the index file as a blob in my MySQL db and have the script write that file to the newly created dirs. Is this feasible (especialy with the safe-mode restrictions) ?
Any tips or examples would be much appreciated.
Thanks!
-s