获得$ _FILES数组空对一些特定的图像文件 [英] Getting $_FILES array empty for some specific image files

查看:105
本文介绍了获得$ _FILES数组空对一些特定的图像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下面的HTML code上传图片文件:

I've following HTML code to upload image file :

<form id="request_form" method="post" enctype="multipart/form-data" action="print.php">
  <input type="file" name="student_image" id="student_image" accept="image/*" capture/>                  
  <button type="submit">Submit</button>
</form>

PHP code是如下:

PHP code is as follows :

<?php
print_r($_FILES);// Here I'm getting blank $_FILES array for few specific image files which are greater than 10 MB in size
?>

以下是文件上传从我的php.ini文件中设置:

Following are the file upload setting from my php.ini file:

upload_max_filesize = 10M

post_max_size = 10M

我得到空数组,当我尝试上传这比 10 MB 更大尺寸的图像文件。

I'm getting the blank array when I try to upload image files which are greater than 10 MB in size.

请帮我从这个问题。

推荐答案

您需要修改php.ini文件,并设置超过10M更大的价值,它被配置为Apache和Apache不会让你送大图与之前的文件

You need to change your php.ini file and set greater value than 10M, it is config for Apache, and Apache doesn't let you to send big image and files before it

这篇关于获得$ _FILES数组空对一些特定的图像文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆