Warning: Unable to open '' for reading: No such file or directory in /users/ionichost.com/kudose/uploader.php on line 10
is the error I get on this script.
Here is the form script:
<?
include('hiddencode.php');
include('top.php');
include('left.php'); ?>
<FORM ENCTYPE="multipart/form-data" ACTION="uploader.php" METHOD="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="200000">
The file: <INPUT TYPE="file" NAME="userfile">
<INPUT TYPE="submit" VALUE="Upload">
</FORM>
<?
include('bottom.php');
?>
Here is the action script.
<?
$uploaddir = '/cars';
$uploadfile = $uploaddir . $HTTP_POST_FILES['userfile']['name'];
print "<pre>";
if (copy($HTTP_POST_FILES['userfile']['tmp_name'], $uploadfile)) {
print "File is valid, and was successfully uploaded. ";
print "Here's some more debugging info:\n";
print_r($HTTP_POST_FILES);
} else {
print "Possible file upload attack! Here's some debugging info:\n";
print_r($HTTP_POST_FILES) or die(mysql_error());
}
print "</pre>";
?>
I have the cars dir set to CHMOD 777 and my abolute path is listed in the warning. Can anyone help out?
Thanks.