[solved]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
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

[solved]uploading

Post 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?!?!
Last edited by Illusionist on Fri Mar 19, 2004 11:07 pm, edited 1 time in total.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post 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.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

ImageImageImageImageImage
ARG!!! forgot to actually create the folder!! Stupid Stupid Stupid Stupid!!!
Last edited by Illusionist on Fri Mar 19, 2004 8:46 pm, edited 1 time in total.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

happens to the best of us....

yeah, bad days occur here n there. kudos
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

lol, tahnks for the suggestion! Ill see where i can implement it!!
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

lol Very pleasant smilie ya posted there... :wink:
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

:-D thanks!!
Post Reply