警告:POST Content-Length为10467213字节超过了第0行的Unknown中的8388608字节限制

时间:2016-02-14 23:10:22

标签: php post warnings filesize content-length

我收到此内容长度错误,但是当用户尝试通过检查是否超过指定的最大图像大小来上传图像时,我确实已经进行了检查。

这是我的代码:

    //file size of the chosen image
    $file_size = $_FILES['profile']['size'];
    //setting maximum file size
    $max_file_size = 50000;

if($file_size < $max_file_size){ 

            change_profile_image($session_user_id, $file_temp, $file_explode);
            header('Location: userprofile.php');
            exit();
} else {
            echo 'File size should be less than 50 KB';

}

因此,通过此检查,我假设如果用户上传的文件大小超过50 KB,则应该回显“文件大小应小于50 KB”。

谢谢你们 p.s情人节快乐和快乐编码!!!! :)

0 个答案:

没有答案
相关问题