I am trying to move an uploaded file into a directory other then the one I am storing my upload.php file in. This is the code I am using...
HTML:
<form name="frmUpload" action="upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<table>
<tr>
<td><input name="objFile" type="file"></td>
</tr>
<tr>
<td><input name="btnSubmit" type="submit" value="Upload"></td>
</tr>
</table>
</form>
</body>
PHP:
<?
if (is_uploaded_file($objFile)) {
move_uploaded_file($objFile, "/potd/$objFile_name");
} else {
echo "Possible file upload attack, filename: $objFile";
?>
Error #1: Unable to create '/potd/image.jpg': No such file or directory in [server_side_path_to_php_file]
Error #2: Unable to move 'C:\WINNT\TEMP\php5C0.tmp' to '/potd/image.jpg' in [server_side_path_to_php_file]