Re: copy() for file upload

From: Date: Wed, 05 Feb 2003 12:15:20 +0000
Subject: Re: copy() for file upload
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-18363@lists.php.net to get a copy of this message
Try move_uploaded_file and check rights for destination directory. Jochem thomash@gmx.co.za wrote:
Hi guys, I realize that this might be rather a question for the general list, but i will try it here anyway (still have to subscribe to general). I am using the copy() method to upload pictures to my site. However, i am experiencing all sorts of problems. The most common one is that it does not find the 'on-the-fly' variable called $File_name. This var gets created with the filename of the upload picture. Here are the two error messages i encounter: 1. Running Linux: Warning: Unable to open 'C:\\Documents and Settings\\Thomash\\My Documents\\My Pictures\\ieeelogo2.gif' for reading: No such file or directory in /usr/www/users/thomasd/members/mypictures.php on line 37 Warning: unlink() failed (No such file or directory) in /usr/www/users/thomasd/members/mypictures.php on line 38 ----------------------------------------------------------------------------------------------------------- 2. Windows 2000: Notice: Undefined variable: File_name in c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 37 Warning: copy(../images/mypictures/_general/uploads/) [function.copy]: failed to create stream: Permission denied in c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 37 Notice: Undefined variable: File_name in c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 43 -------------- Both times Apache is used. Thomas Hochstetter


« previous php.windows (#18363) next »