pornflakes Posted September 8, 2009 Share Posted September 8, 2009 Hi guys, this upload works fine for small files but shows blank page when I try bigger files (> 1Mb) <form action="upload.php" method="post" ENCTYPE="multipart/form-data"> File: <input type="file" name="file"> <input type="submit" value="Upload"> </form> <br /> <?php $target_path = "uploads/"; $target_path = $target_path . basename( @$_FILES['file']['name']); if(move_uploaded_file(@$_FILES['file']['tmp_name'], $target_path)) { echo '<span style="color:green">File ' . basename(@$_FILES['file']['name']) . ' has been uploaded</span>'; } else{ echo '<span style="color:red">File could not be uploaded</span>'; } ?> Any ideas/suggestion are appreciated. Thanks Link to comment https://forums.phpfreaks.com/topic/173530-problem-uploading-larger-files/ Share on other sites More sharing options...
Adam Posted September 8, 2009 Share Posted September 8, 2009 Most likely it's exceeding the max. upload file size set by the PHP config. Try using phpinfo to locate the "upload_max_filesize" property and check the value. Link to comment https://forums.phpfreaks.com/topic/173530-problem-uploading-larger-files/#findComment-914694 Share on other sites More sharing options...
pornflakes Posted September 8, 2009 Author Share Posted September 8, 2009 Ok, I checked phpinfo() and altered upload_max_filesize ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 30M this works for some files now but some .rar files still can´t be uploaded <input type="hidden" name="upload_max_filesize" value="20000000" /> Will adding this line overwrite the value in php.ini ? Link to comment https://forums.phpfreaks.com/topic/173530-problem-uploading-larger-files/#findComment-914798 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.