Re: rename an uploaded file.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bosky, Dave wrote:
I seem to be having some trouble renaming a file after uploading it.

It always returns a warning message indicating I have an invalid
attribute in my rename statement.
<snip>
$old = 'C:\\homedirectory\uploadedfiles\\newfile.gif';

$new = 'C:\\homedirectory\\uploadedfiles\\2005-08-05-09:00:00.gif';

move_uploaded_file(temp fileuploaded, $old);
rename($old,$new);

Colons (:) are not allowed in Windows filenames.

Also, you don't need to escape the backslashes when using single quotes.

-Stuart

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux