Error with uploading

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
the_last_tamurai
Forum Commoner
Posts: 87
Joined: Wed Feb 28, 2007 8:24 am
Location: cairo
Contact:

Error with uploading

Post 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;
		      
			  }
			}
User avatar
the_last_tamurai
Forum Commoner
Posts: 87
Joined: Wed Feb 28, 2007 8:24 am
Location: cairo
Contact:

Post by the_last_tamurai »

is the question [s]lake[/s] lack info ? please ,inform me.....
User avatar
the_last_tamurai
Forum Commoner
Posts: 87
Joined: Wed Feb 28, 2007 8:24 am
Location: cairo
Contact:

Post by the_last_tamurai »

mmmmm..
it's sunday....week end .... day off ... no one here ????? :?
User avatar
the_last_tamurai
Forum Commoner
Posts: 87
Joined: Wed Feb 28, 2007 8:24 am
Location: cairo
Contact:

Post by the_last_tamurai »

well , I've to puinsh myself for that.....
it's solved now....
just change distination to
www/images
:? :? :?
:oops:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply