在htaccess中设置内存限制

编程入门 行业动态 更新时间:2024-10-25 04:25:18
本文介绍了在htaccess中设置内存限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在做文字印刷。我需要增加内存,因此将以下行添加到我的htaccess文件中

I am working on word press. I need to increase the memory so added the following line to my htaccess file

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> php_value memory_limit 64M

我的示例php页面

,但会引发500个内部服务器错误。

my sample php page

but it throws the 500 internal server error. what is the problem here..

推荐答案

在您的 .htaccess 中,您可以添加:

In your .htaccess you can add:

PHP 5.x

<IfModule mod_php5.c> php_value memory_limit 64M </IfModule>

PHP 7.x

<IfModule mod_php7.c> php_value memory_limit 64M </IfModule>

如果页面再次中断,则说明您在Apache中使用PHP作为mod_php,但是由于某些原因而导致错误否则。

If page breaks again, then you are using PHP as mod_php in apache, but error is due to something else.

如果页面没有中断,则说明您使用PHP作为CGI模块,因此不能使用php值-在我提供的链接中可能是解决方案,但我''不确定您是否能够应用它。

If page does not break, then you are using PHP as CGI module and therefore cannot use php values - in the link I've provided might be solution but I'm not sure you will be able to apply it.

有关 support.tigertech/php-value

更多推荐

在htaccess中设置内存限制

本文发布于:2023-11-02 08:29:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551897.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内存   htaccess

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!