Re: Parse error ???
| From: | Michael Nolan | Date: | Thu, 04 Mar 2004 13:57:22 +0000 |
| Subject: | Re: Parse error ??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179444@lists.php.net to get a copy of this message | ||
Is this what it actually looks like?
if(!move_uploaded_file($_FILES['myfile']['tmp_name
'],
"/var/www/html/upload/")) {
die "Error! Moving the uploaded file failed.";
If so, the files array shouldn't be like that. It shouldn't be split onto two lines. Try $_FILES['myfile']['tmp_name'].
Mike
Mike Mapsnac wrote:
brackets solve the probleb. But why I have the warning messages? The permission on the directory is correct. Any ideas what can cause such messages? Warning: move_uploaded_file(/var/www/html/upload/): failed to open stream: Is a directory in /var/www/html/uploadproc.php on line 11 Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to '/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11 Error Moving the uploaded file failed.From: Michael Nolan <michael@michaelnolan.co.uk> To: php-general@lists.php.net Subject: [PHP] Re: Parse error ??? Date: Thu, 04 Mar 2004 13:40:46 +0000 Mike Mapsnac wrote:The script should upload files (images). Error message is give below, any ideas why I get this errror message? Parse error: parse error in /var/www/html/uploadproc.php on line 3die() needs brackets around its arguments, eg: die("Error! The expected file wasn't a part of the submitted form"); Mike