File upload problem
Posted: Fri Oct 25, 2002 8:04 pm
I'm having a small file uploading problem...
i keep getting the error:
Warning: Unable to open 'none' for reading: No such file or directory in /home/www/html/upload.php on line 11
Here's the HTML
And the PHP:
if anyone knows....you'll make me happy
i keep getting the error:
Warning: Unable to open 'none' for reading: No such file or directory in /home/www/html/upload.php on line 11
Here's the HTML
Code: Select all
<form enctype="multipart/form-data" action="<?PHP $PHP_SELF ?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <input name="userfile" type="file">
<input name="submit" type="submit" value="Send File">
</form>Code: Select all
<?php
if(isset($HTTP_POST_VARSї"submit"]))
{
$target = "/home/www/html/uploads";
if (is_dir($target) AND is_writable($target))
{
$filename = $HTTP_POST_FILESї'userfile']ї'name'];
copy($HTTP_POST_FILESї'userfile']ї'tmp_name'], "$target/$filename");
}
else
echo $target. ': invalid or write was denied';
}
?>