Page 1 of 1

[solved]uploading

Posted: Fri Mar 19, 2004 8:35 pm
by Illusionist

Code: Select all

$uploaddir = 'files\'';
	move_uploaded_file($_FILES['pic']['tmp_name'], $uploaddir . $_FILES['pic']['name']); //line 9
how come i always get:

Code: Select all

Warning: move_uploaded_file(files\poll.gif): failed to open stream: No such file or directory in O:\Program Files\Apache Group\Apache2\htdocs\tests\upload.php on line 9
but if i take out the $uploaddir it works.... I've even tried using the full path, and keep getting the same error!! Whats going on?!?!

Posted: Fri Mar 19, 2004 8:41 pm
by tim
hi ill,

try implenting the pathinfo() function.

http://us4.php.net/manual/en/function.pathinfo.php

even if it dont solve your problem, it will be a better addition to your code.

Posted: Fri Mar 19, 2004 8:43 pm
by Illusionist
ImageImageImageImageImage
ARG!!! forgot to actually create the folder!! Stupid Stupid Stupid Stupid!!!

Posted: Fri Mar 19, 2004 8:45 pm
by tim
happens to the best of us....

yeah, bad days occur here n there. kudos

Posted: Fri Mar 19, 2004 8:46 pm
by Illusionist
lol, tahnks for the suggestion! Ill see where i can implement it!!

Posted: Fri Mar 19, 2004 10:15 pm
by m3mn0n
lol Very pleasant smilie ya posted there... :wink:

Posted: Fri Mar 19, 2004 11:05 pm
by Illusionist
:-D thanks!!