Error with uploading
Posted: Sun Mar 04, 2007 5:01 am
Hi ,
I'm working on the upload page in my project.....will I have some kind of a problem
I'm using zend framework but working with upload old fashion syntax not zend library..
the problem is :
oh sorry , I forgot to say that when I put the real to the destination folder like
here the loop to my $_FILES array ( multiple upload)
I'm working on the upload page in my project.....will I have some kind of a problem
I'm using zend framework but working with upload old fashion syntax not zend library..
the problem is :
andWarning: move_uploaded_file(/project/www/images/78c99365e0.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in bath\to\project\app\controllers\MembersController.php on line 32
I tried to use zend_http_client to upload but no tutorials or examples availableWarning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\xampp\tmp\php166.tmp' to '/project/www/images/78c99365e0.jpg' in bath\to\project\app\controllers\MembersController.php on line 32
oh sorry , I forgot to say that when I put the real to the destination folder like
it works.....C:\.....\project\www\images\78c99365e0.jpg
here the loop to my $_FILES array ( multiple upload)
Code: Select all
foreach ($_FILES['images']['error'] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$uploaddir = "/project/www/images";
$uploadfile = $uploaddir . "/" . basename($_FILES['images']['name'][$key]);
print "<br>".$_FILES['images']['tmp_name'][$key]."<br>";
move_uploaded_file($_FILES['images']['tmp_name'][$key],$uploadfile);
if (!file_exists($uploadfile)) return false;
}
}