jaikar Posted March 13, 2007 Share Posted March 13, 2007 Hi, which config decides the size of the file to be uploaded, is it upload_max_filesize or post_max_size ? on my server post_max_size = 8M upload_max_filesize = 2M i uploaded a file for 3M and its not getting saved in the directory.. if Upload_max_filesize decides the file size then what for post_max_size is used... ? can anyone help ? :-) Thanks in Advance !!... ~J Link to comment https://forums.phpfreaks.com/topic/42475-file-uploading/ Share on other sites More sharing options...
only one Posted March 13, 2007 Share Posted March 13, 2007 if($_POST["action"] == "Upload Image") { unset($imagename); if(!isset($_FILES) && isset($HTTP_POST_FILES)) $_FILES = $HTTP_POST_FILES; if(!isset($_FILES['image_file'])) $error["image_file"] = "An image was not found."; $imagename = basename($_FILES['image_file']['name']); //echo $imagename; if(empty($imagename)) $error["imagename"] = "The name of the image was not found."; if(empty($error)) { $newimage = "uploads/" . $imagename; //echo $newimage; $result = @move_uploaded_file($_FILES['image_file']['tmp_name'], $newimage); if(empty($result)) echo "Profile Pic updated"; }else{ echo "Invalid Filename, Please change its name to your username."; $error["result"] = "There was an error moving the uploaded file."; }} extract of a code i made a long time ago to upload images... Link to comment https://forums.phpfreaks.com/topic/42475-file-uploading/#findComment-206059 Share on other sites More sharing options...
jaikar Posted March 13, 2007 Author Share Posted March 13, 2007 Hi i meant in the php.ini file which decides te size of the file .... upload_max_filesize or post_max_size ? Thanks Link to comment https://forums.phpfreaks.com/topic/42475-file-uploading/#findComment-206073 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.