PHP多个文件上传在服务器上不起作用
我已经共享托管,并且有一个脚本可以一次在服务器上上传多个文件,
I've shared hosting and there is a script to upload multiple files at once at server,
它在本地主机上正常运行,但似乎在远程服务器上不运行.
It is working properly in localhost but it seems not working at the remote server.
但是,文件数量较少时,它可以工作.我在php.ini
变量下面设置了
However while there is less amount of files, it works. I've set below php.ini
variables as,
php.ini 文件
upload_max_filesize = 100M
post_max_size = 100M
max_file_uploads = 70
post_max_size = 100M
我还在上传后端脚本中设置了以下变量,
I've also set below variables at upload back-end script,
ini_set('post_max_size', '100M');
ini_set('upload_max_filesize', '100M');
ini_set('max_execution_time', 0);
ini_set("memory_limit", "-1");
set_time_limit(0);
ini_set('max_file_uploads', '100');
ini_set('display_errors', 1);
error_reporting(E_ALL); // E_ALL
并且仍然无法正常工作.
and still not working.
没有错误/警告显示.并在phpinfo()
中查找,这些值正确无误(如上所述)
There is no error / warnings displaying. And also looking in phpinfo()
, the values are as correct as it should be (as specified above)
注意::通常我每个文件大约 800kb ,文件数量通常在 25 左右.
Note : Generally I've around 800kb per file and number of files are generally around 25.
问题已解决.
问题的原因:php.ini
的更改未反映在服务器上.因此,与托管服务提供商联系,即可解决问题.
Reason of problem : Changes to the php.ini
was not reflecting at server. So, contacting hosting provider, the problem is solved.