Hi,
PHP has its own filesystem functions which you can use.
If you want to move a file from one location to another you could use
something like this
<?
copy($old_file,$new_file);
unlink($old_file);
?>
The $old_file and the $new_file variables should contain the absolute path
e.g. /home/user/filename.txt
Check http://www.php.net/manual/en/ref.filesystem.php for a more detailed
explanation of the filesystem functions.
HTH
Dobromir Velev
-----Original Message-----
From: Jon Mormino <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, September 13, 2001 11:10 PM
Subject: [PHP-DB] moving uploaded files
Does anyone have a solution for the following problem.
I use dbwired.com for hosting (great service). They do not, however,
for obviously reasons allow the system() command from a php script.
So, when I switched to this server I had to switch from a system("mv
file1 file2"); command to a move_uploaded_file("path1","path2"); command
which is fine...for uploading. But, once a file is uploaded I can't
figure out a way to move or delete it as it is no longer considered an
"uploaded file" and hence move_uploaded_file() fails. Does anyone know
a way around this?
Thanks.
-Jon Mormino
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]