cant upload above 100kb
Posted: Thu Dec 09, 2010 11:05 am
Hi
i have checked the cPanel and it notes:
File Uploads file_uploads On
File Uploads upload_max_filesize 50M
my code is
but no matter what i do to the size section, i cant upload past 100kb
does anyone know how to fix this?
thanks
i have checked the cPanel and it notes:
File Uploads file_uploads On
File Uploads upload_max_filesize 50M
my code is
Code: Select all
<?php
if((!empty($_FILES["uploaded_file"])) && ($_FILES['uploaded_file']['error'] == 0)) {
$filename = basename($_FILES['uploaded_file']['name']);
if (($_FILES["uploaded_file"]["size"] < 100000000)) {
$newname = dirname(__FILE__).'/upload/'.$filename;
if (!file_exists($newname)) {
if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) {
echo "It's done! The file has been saved as: ".$newname;
} else {
echo "Error: A problem occurred during file upload!";
}
} else {
echo "Error: File ".$_FILES["uploaded_file"]["name"]." already exists";
}
} else {
echo "Error: Size limit exceeded";
}
} else {
echo "Error: No file uploaded";
}
?>
does anyone know how to fix this?
thanks