PHP多个文件上传在服务器上不起作用 [英] php multiple file upload not working at server

查看:132
本文介绍了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.

这篇关于PHP多个文件上传在服务器上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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