Page 1 of 1

Error with uploading

Posted: Sun Mar 04, 2007 5:01 am
by the_last_tamurai
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 :
Warning: 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
and
Warning: 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
I tried to use zend_http_client to upload but no tutorials or examples available

oh sorry , I forgot to say that when I put the real to the destination folder like
C:\.....\project\www\images\78c99365e0.jpg
it works..... :?

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;
		      
			  }
			}

Posted: Sun Mar 04, 2007 6:51 am
by the_last_tamurai
is the question [s]lake[/s] lack info ? please ,inform me.....

Posted: Sun Mar 04, 2007 9:06 am
by the_last_tamurai
mmmmm..
it's sunday....week end .... day off ... no one here ????? :?

Posted: Sun Mar 04, 2007 9:18 am
by the_last_tamurai
well , I've to puinsh myself for that.....
it's solved now....
just change distination to
www/images
:? :? :?
:oops:

Posted: Sun Mar 04, 2007 9:19 am
by feyd
STOP BUMPING YOUR THREAD.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:4. All users of any level are restricted to bumping (as defined here) any given thread within twenty-four (24) hours of its last post. Non-trivial posts are not considered bumping. A bump post found in violation will be deleted, and you may or may not receive a warning. Persons bumping excessively be considered as spammers and dealt with accordingly.