本文介紹了ini_set("upload_max_filesize","200M") 在 php 中不起作用的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
限時(shí)送ChatGPT賬號(hào)..
<塊引用>可能的重復(fù):
覆蓋upload_max_filesize
我使用這些代碼來更改上傳文件大小:-
echo ini_get('upload_max_filesize').'
';ini_set("upload_max_filesize","300M");echo ini_get("upload_max_filesize");
但是我得到了
2M2M
在 php.ini 中設(shè)置.
我想更改文件上傳大小限制.
解決方案
- http://php.net/manual/en/ini.list.php莉>
<塊引用>
upload_max_filesize "2M" PHP_INI_PERDIR
- http://php.net/manual/en/configuration.changes.modes.php一個(gè)>
<塊引用>
PHP_INI_PERDIR 可以在 php.ini、.htaccess、httpd.conf 或 .user.ini 中設(shè)置條目(自 PHP 5.3 起)
因此您不能為此使用 ini_set
.
Possible Duplicate:
overriding upload_max_filesize
i use these code for change upload file size :-
echo ini_get('upload_max_filesize').'<br/>';
ini_set("upload_max_filesize","300M");
echo ini_get("upload_max_filesize");
BUT I GOT
2M
2M
which is set in php.ini.
i want to change file upload size limit.
解決方案
- http://php.net/manual/en/ini.list.php
upload_max_filesize "2M" PHP_INI_PERDIR
- http://php.net/manual/en/configuration.changes.modes.php
PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)
So you can't use ini_set
for this.
這篇關(guān)于ini_set("upload_max_filesize","200M") 在 php 中不起作用的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!