View Full Version : Resolved Simple upload not working

01-30-2010, 07:19 PM
I've used this same coding on another website and it worked perfectly. However it won't work on another.


$page .= '<form enctype="multipart/form-data" action="alliance.php?do=banner" method="POST">';
$page .= '<input type="hidden" name="MAX_FILE_SIZE" value="1500000">
<input type="hidden" name="completed" value="1">';
$page .= '<p><b>Banner Image:</b> <input type="file" name="mailfile" size="chars"><br /><br /><input type="submit" name="submit" value="Make Changes"></form>';


//Start image upload
$newname = uniqid("a").".jpg";
//End of request image

The directory aimages is CHMOD to 777.

I get the following errors.

Warning: move_uploaded_file(/aimages/a4b6486f401249.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/rodgameo/public_html/alliance.php on line 3345

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/var/tmp/phprYUEiY' to '/aimages/a4b6486f401249.jpg' in /home/rodgameo/public_html/alliance.php on line 3345

01-30-2010, 07:26 PM
I should have played with it more, found out it was just a path error.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum