简体   繁体   English

无法在php.ini中更改upload_max_filesize

[英]Unable to change upload_max_filesize in php.ini

Running PhP v. 5.6.12 on localhost after extracting xampp-win32-v. 解压缩xampp-win32-v后,在localhost上运行PhP v。5.6.12。 5.6.12.0-VC.7z through xampp control panel v. 3.2.1 with administrator rights on Windows 7 Ultimate (64-bit). 在Windows 7 Ultimate(64位)上通过具有管理员权限的xampp控制面板3.2.1版通过5.6.12.0-VC.7z。

After editing php.ini in the php folder in xampp to change upload_max_filesize, phpinfo() shows no change of default value ie 2M. 在xampp的php文件夹中编辑php.ini以更改upload_max_filesize后,phpinfo()不会显示默认值即2M的更改。 Checked phpinfo() through xampp and by creating a test file also. 通过xampp并通过创建测试文件来检查phpinfo()。 Same value of 2M is displayed. 显示相同的值2M。

Searched all concerned forums, but same old solutions didn't solve the problem. 搜索了所有相关的论坛,但是相同的旧解决方案无法解决问题。 Any help will be appreciated. 任何帮助将不胜感激。 Thanks. 谢谢。

Providing solution to help others having similar problems. 提供解决方案以帮助其他有类似问题的人。 Editing the original php.ini file in Notepad++ v. 6.8.3 didn't have any effect. 在Notepad ++ v.6.3.3中编辑原始php.ini文件没有任何效果。 Therefore, copied contents of the original php.ini file and pasted it to create a new php.ini file in Notepad++ itself. 因此,复制原始php.ini文件的内容并将其粘贴以在Notepad ++本身中创建一个新的php.ini文件。 Changed the required values and saved. 更改所需的值并保存。 Bingo! 答对了!

Like yourself, I tried all the available solutions with no success so I figured why not to delete the file and create a new one from scratch. 像您自己一样,我尝试了所有可用的解决方案都没有成功,因此我想出了为什么不删除该文件并从头开始创建新文件的方法。 And voila it worked. 瞧,它奏效了。

I use Visual Code Studio but it should work with other file editors. 我使用Visual Code Studio,但它应与其他文件编辑器一起使用。

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

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