简体   繁体   English

如何使用.htaccess文件启用php扩展

[英]How can i enable php extension with .htaccess file

I need to enable php_intl extension only in a subdomain of my website, so i use the .htaccess file to do it with this code. 我只需要在我的网站的子域中启用php_intl扩展,所以我使用.htaccess文件来执行此代码。

<IfModule mod_php4.c>
    php_extension_dir php_intl.dll
    php_extension php_intl.dll
</IfModule>

But not work. 但不行。 Someone helpe me, please? 请问有人帮我吗?

The directive php_extension_dir should be: 指令php_extension_dir应该是:

php_extension_dir <path_to__php_extensions>

Where <path_to_php_extensions> is the absolute path to where your PHP extensions are installed. 其中<path_to_php_extensions>是安装PHP扩展的绝对路径。 Simply putting the file name here does nothing, since a path value is expected. 简单地将文件名放在此处不起作用,因为预期路径值。

If this still does not work, then PHP is set up as CGI and therefore cannot use htaccess to load modules. 如果这仍然不起作用,那么PHP被设置为CGI,因此不能使用htaccess来加载模块。 Take a look here if that is the case. 如果是这样的话, 看看这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM