PHP修改memory_limit内存限制的方法详解

今天我的新一台服务器安装了php环境但在在运行时提示Fatal Error: Allowed memory size of xxxxxx bytes exhausted了,是内存不足呀,下面我来介绍解决些问题的几种办法。

方法1:编辑php.ini 在php.ini中

找到“memory_limit”这一项,如果没有,你可以在文件的尾部自己增加这个参数,以下是一些设置范例,memory_limit = 128M ;可以将128M改为任何你想设置的值.

方法2:.htaccess

说明:这种方法只有在php以Apache模块来执行时才生效,在你的网站的根目录下找到“.htaccess”文件,如果没有,可以自己创建一个,然后把以下配置放入其中

php_value memory_limit 128M;可以将128M改为任何你想设置的值.

方法3:运行时修改php的内存设置

在你的php代码中增加以下命令行即可:ini_set('memory_limit','128M');

友情提示:如果你是php5.2.17可能上面办法对你都无效,这个官方就是bug无法解决些问题,我们也只能重新安装php环境了,如php5.4

波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!

波比源码 » PHP修改memory_limit内存限制的方法详解

124 评论

  1. order lamictal pills buy vermox generic retin gel

  2. order accutane 40mg without prescription isotretinoin us azithromycin 500mg cheap

  3. cheap indomethacin 50mg lamisil uk amoxicillin drug

  4. tadalafil 40mg cost Order viagra us order sildenafil 100mg online

  5. buy deltasone 20mg generic generic tadalafil viagra next day delivery usa

  6. molnupiravir 200 mg cost omnicef 300 mg canada buy lansoprazole 15mg without prescription

  7. chloroquine 250mg pill olumiant oral baricitinib 4mg over the counter

  8. order generic tadalafil 20mg cialis pills 20mg order sildenafil 50mg online cheap

  9. casino slot best ed drug tadalafil without a doctor’s prescription

  10. purchase retin sale order retin cream avanafil 200mg over the counter

  11. blackjack online us slot game blackjack online

  12. order doxycycline 100mg online cheap brand clindamycin cleocin 150mg generic

  13. oxybutynin 5mg brand prograf 1mg ca order oxcarbazepine generic

  14. order generic letrozole 2.5 mg sildenafil 25mg sildenafil 100mg canada

  15. order tadalafil 40mg without prescription cialis no prescription buy erectile dysfunction medicine

  16. buy glycomet paypal metformin price buy norvasc online cheap

  17. buy lisinopril 2.5mg without prescription lopressor us where can i buy lopressor

  18. rosuvastatin generic ezetimibe pills domperidone online order

  19. order generic sumycin flexeril cost ozobax over the counter

  20. order toradol online gloperba generic buy inderal pills for sale

  21. order furosemide 40mg generic lasix brand albuterol 4mg over the counter

  22. buy vardenafil pill levitra drug buy generic hydroxychloroquine

发表评论

Hi, 如果你对这款模板有疑问,可以跟我联系哦!

联系站长
赞助VIP 享更多特权,建议使用 QQ 登录
喜欢我嘛?喜欢就按“ctrl+D”收藏我吧!♡