Warning: move_uploaded_file(/images/buttons/go.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/papermom/public_html/manager/settings/buttons2.php on line 36
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpKgiw9D' to '/images/buttons/go.gif' in /home/papermom/public_html/manager/settings/buttons2.php on line 36
Array ( [ufile] => Array ( [name] => ad2.gif [type] => image/gif [tmp_name] => /tmp/phpKgiw9D [error] => 0 [size] => 20020 ) )
----this shows above my little upload box html....here is the code i have now:
<?php
if (isset($_FILES['ufile']['tmp_name']))
{
$UPLOAD_DIR ='/images/buttons/';
$file ='go.gif';
move_uploaded_file($_FILES['ufile']['tmp_name'], $UPLOAD_DIR.$file);
}
print_r($_FILES);
?>
<table width="530" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form action="buttons2.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<td>
<table width="100%" border="0" cellpadding="10" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td width="20%"><strong>Go Button </strong></td>
<td width="50%"><input name="ufile" type="file" id="ufile" size="25" /></td>
<td width="13%"><input type="submit" name="Submit" value="Upload" /></td>
<td width="17%"><div align="center">
<?php
echo "<img src=\"/images/buttons/go.gif\" title=\"Go Button\" alt=\"Go Button\" />";
?>
</div></td>
</tr>
</table>
</td>
</form>
</tr>
</table>