You are here: Re: [PHP] rename an uploaded file. « PHP « IT news, forums, messages
Re: [PHP] rename an uploaded file.

Posted by Stut on 10/01/60 11:24

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация