php设置内存

WBOY
Release: 2016-06-23 14:31:38
Original
1805 people have browsed it

虽然Drupal核心的运行只需要你的服务器分配8MB的内存,但是根据你站点上使用的模块数量,你可能需要增加些内存分配。当你访问?q=admin/moudles时会加载你站点上的所有模块,不管你是否启用。如果你出现了白屏,你只有两个选择:增加分配给PHP的内存,或者删除不使用的模块。

根据你的主机的不同,有几个地方都可以完成这个配置,一般是php.ini,或者htaccess,具体要看你的主机状态。
比如:

在你的php.ini文件里设置memory_limit = 12M(推荐使用,如果你拥有这个权限的话) 在你的sites/default/settings.php文件里设置ini_set('memory_limit','12M'); 在你的Drupal根目录下的.htaccess文件中设置php_value memory_limit 12M
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!