Re: writing file on server from database?

From: Date: Wed, 03 Mar 2004 15:09:20 +0000
Subject: Re: writing file on server from database?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-179344@lists.php.net to get a copy of this message
Raisinlove wrote:
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
Ok forget what I said regarding the database. I would just like to figure out how to copy a file from one directory to another using move_uploaded_file. I cant find any proper examples...

« previous php.general (#179344) next »