在哪里可以编辑以增加PHP ini文件中的内存? [英] Where to edit for increase in memory in PHP ini file?

查看:88
本文介绍了在哪里可以编辑以增加PHP ini文件中的内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确实有一个读取文本文件的PHP脚本.当文本文件大小超过特定限制脚本时,将出错并停止.当我将文件分为两个时,它可以工作.那么PHP中用于增加读取文件内存的设置在哪里?

Hi I do have a PHP script which reads text file. when text file size is above the certain limit script gives error and stops. when I divide files into two it works. so where is that settings in PHP to increase read file memory?

推荐答案

设置为memory_limit,您可以在php.ini文件中为所有脚本进行更改,或者(更好)只是在代码中进行更改一个导致您出现问题的脚本:

The setting is memory_limit and you can change it in the php.ini file for all scripts, or (better) just change it in the code for the one script that is causing you problems:

ini_set('memory_limit', '64M');

这篇关于在哪里可以编辑以增加PHP ini文件中的内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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