| 
	
 | 
 Posted by Stut on 06/14/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] 
 |