我正在做文字印刷。我需要增加内存,因此将以下行添加到我的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中设置内存限制
发布评论