简体   繁体   English

文件上传在php中的服务器上不起作用

[英]File upload not working on server in php

I am facing a problem while uploading a file/ image in PHP. 在PHP中上传文件/图像时遇到问题。 When I uplopad an 8kb file it works fine but when I upload more that 50kb file it keeps on loading and do nothing, I have checked upto 5 mins. 当我上传一个8kb的文件时,它可以正常工作,但是当我上传超过50kb的文件时,它可以继续加载且不执行任何操作,我最多检查了5分钟。 The path to phpinfo() on my server is http://kogd.tw/jatin.php 我服务器上phpinfo()的路径是http://kogd.tw/jatin.php

I have tried to set following variables in my .htacess file but nothing worked. 我试图在.htacess文件中设置以下变量,但没有任何效果。

php_value file_uploads  On
php_value memory_limit  1024M
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Can anyone please help me regarding it. 任何人都可以帮我一下。

To know the problem more, please try to upload a file on link http://kogd.tw/jatin_upload.php 要了解更多问题,请尝试在链接http://kogd.tw/jatin_upload.php上载文件

You can try to cahnge de default values with ini_set 您可以尝试使用ini_set更改默认值

ini_set("upload_max_filesize","60M");
ini_set("post_max_size","64M");

change the MB whatever you want to. 随便更改MB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM