Re: Copying an uploaded file...
| From: | René Fournier | Date: | Thu, 30 Oct 2003 03:09:47 +0000 |
| Subject: | Re: Copying an uploaded file... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-168113@lists.php.net to get a copy of this message | ||
I've added a path, but still no success....
On Wednesday, October 29, 2003, at 05:11 PM, John Nichel wrote:
René Fournier wrote:Thanks John. I've simplified and improved the quote per your suggestions, but still no dice. (I'[m running OS X 10.2.8.) Here is the code: // MOVE FILE if (move_uploaded_file($_FILES['userfile']['tmp_name'],$_FILES['userfile'][ 'name'])) {Give it a path for the file to be moved too... if(move_uploaded_file($_FILES['userfile']['tmp_name'], "/path/to/save/" . $_FILES['userfile']['name'])) {echo "Success!"; } else { echo "NO!!!"; }Here are the results:NO!!!--By-Tor.com It's all about the Rush http://www.by-tor.com --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpArray ( [img_photo] => Array ( [name] => apache_pb.gif [type] => image/gif [tmp_name] => /var/tmp/phpvnTFqr [error] => 0 [size] => 2326 ) ) Should the tmp directory maybe be set elsewhere? (If so, how can that be done? I've looked at the httpd.conf file, but there is no entry for upload tmp directory.)Many thanks in advance. ...Rene