i get the following errors
( ! ) Notice: Undefined index: file in C:\wamp\www\upload_file.php on line 18 Call Stack
# Time Memory Function Location 1 0.0003 377944 {main}( ) ..\upload_file.php:0
( ! ) Notice: Undefined index: file in C:\wamp\www\upload_file.php on line 24 Call Stack
# Time Memory Function Location 1 0.0003 377944 {main}( ) ..\upload_file.php:0 Upload:
( ! ) Notice: Undefined index: file in C:\wamp\www\upload_file.php on line 25 Call Stack
# Time Memory Function Location 1 0.0003 377944 {main}( ) ..\upload_file.php:0 Type:
( ! ) Notice: Undefined index: file in C:\wamp\www\upload_file.php on line 26 Call Stack
# Time Memory Function Location 1 0.0003 377944 {main}( ) ..\upload_file.php:0 Size: 0 Kb
( ! ) Notice: Undefined index: file in C:\wamp\www\upload_file.php on line 27 Call Stack
# Time Memory Function Location 1 0.0003 377944 {main}( ) ..\upload_file.php:0 Temp file:
( ! ) Notice: Undefined index: file in C:\wamp\www\upload_file.php on line 29 Call Stack
# Time Memory Function Location 1 0.0003 377944 {main}( ) ..\upload_file.php:0
( ! ) Notice: Undefined index: file in C:\wamp\www\upload_file.php on line 31 Call Stack
# Time Memory Function Location 1 0.0003 377944 {main}( ) ..\upload_file.php:0 already exists.
now the file that handles the fileupload
is the following
?php session_start();
ini_set('memory_limit', "400M");
ini_set('max_execution_time', "900");
ini_set('upload_max_filesize', "400M");
ini_set('post_max_size', "400M");
$user=$_SESSION['MM_Username'];
$path="video". "\\" . $user . "\\";
if(!(is_dir($path))){
mkdir(dirname(__FILE__) . "\\". $path,0777);
}
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
if (file_exists($path . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
$path. $_FILES["file"]["name"]);
echo "Stored !";
}
}
?>
if i try to upload a picture everything is fine , but when i try to upload a 300MB movieclip it gives the errors i posted above , i’ve changed the php.ini file on my wamp server that it allows bigger files to upload but still no result
anyone got an idea of whats going wrong?
You are missing the enctype attribute on your form.