不能更改php上传大小的限制 [英] cannot change php upload size limit

查看:114
本文介绍了不能更改php上传大小的限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用uplaodify插件来上传音乐文件。在我的本地Everyting是好的


$ b $ uploadify.php文件在public_html / uploadify目录

我想增加我的上传文件大小限制为10 MB



我试图在public_html中放入

php.ini文件 p>

  post_max_size = 500M 
upload_max_filesize = 500M
max_execution_time = 900;
max_input_time 900

我正在寻找我的phpinfo() ı不能上传大于2MB的b
$ b

我试图把相同的php.ini放在public_html / uploadify中。我可以上传大小为2.5 MB的文件,但没有上限;



 函数ini_set( 'upload_max_size', '10M'); 
ini_set('post_max_size','10M');
ini_set('max_execution_time','900');

行在我的index.php和uploadify.php中。

我应该怎样增加我的文件上传大小限制

编辑

我看$ _FILES [..] ['error']及其7

  UPLOAD_ERR_CANT_WRITE 

值:7 ;无法将文件写入磁盘。在PHP 5.1.0中引入。

但是我可以上传小于2.5 MB的文件



 <$ c $  c> RewriteEngine On 
php_value post_max_size 1000M $ b $ php_value upload_max_filesize 1000M
php_value max_execution_time 6000000

您可以编辑它以满足您的需求。 1000M = 1GB,请相应编辑。请注意,您的主机将需要允许PHP编辑。


I used uplaodify plugin to upload music files. Everyting is okay in my local

uploadify.php file is in public_html/uploadify directory

i want to increment my upload file size limit to 10 MB

i tried to put

php.ini file in public_html

post_max_size = 500M
upload_max_filesize = 500M
max_execution_time = 900;
max_input_time 900

and I am looking my phpinfo() thats good but ı cannot upload bigger than 2MB

And i tried to put same php.ini in public_html/uploadify

Now I can upload file which size 2.5 MB , but no upper;

And

ini_set('upload_max_size','10M');
ini_set('post_max_size','10M');
ini_set('max_execution_time','900');

lines is in the my index.php and uploadify.php

What should I do increment my file upload size limit

EDIT

I look $_FILES[..]['error'], and its 7

UPLOAD_ERR_CANT_WRITE

    Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0.

But I can upload file which smaller than 2.5 MB

解决方案

Edit the .htaccess file in the root folder and add these values:

RewriteEngine On
php_value post_max_size 1000M
php_value upload_max_filesize 1000M
php_value max_execution_time 6000000

You can edit it to suit your needs. 1000M = 1GB, so edit accordingly. Do note that your host will need to allow PHP edits.

这篇关于不能更改php上传大小的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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