Re: upload issue
| From: | Chris | Date: | Sun, 17 Feb 2008 23:57:23 +0000 |
| Subject: | Re: upload issue | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-269457@lists.php.net to get a copy of this message | ||
nihilism machine wrote:
any idea why this fails?this is the error: "Sorry, there was a problem uploading your file"It can't move the file to the $target location, or maybe the file wasn't uploaded properly in the first place. What's in $_FILES['uploaded']['error'] ? http://www.php.net/manual/en/features.file-upload.errors.php
if (move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) {Files do not need to be 0755, they should be 0644 unless you want them to actually run something (eg they are a shell script or perl script that you'd run from the cmd line). -- Postgresql & php tutorials http://www.designmagick.com/// Error echo "File was uploaded!";} else {echo "Sorry, there was a problem uploading your file.";} chmod($target, 0755);