使用.htaccess将allow_url_fopen添加到我的php.ini中 [英] add allow_url_fopen to my php.ini using .htaccess
问题描述
我想在服务器上允许allow_url_fopen
.我已经问过我的房东,他们说可以使用.htaccess
文件来完成.谁能告诉我该怎么做?
I want to allow allow_url_fopen
on my server . I have asked my host and they said it can be done with a .htaccess
file. Can anyone tell me how to go about this ?
推荐答案
尝试一下,但是我认为它不会起作用,因为您不应该能够更改它
Try this, but I don't think it will work because you're not supposed to be able to change this
将此行放在要启用设置的目录中的htaccess文件中:
Put this line in an htaccess file in the directory you want the setting to be enabled:
php_value allow_url_fopen On
请注意,此设置仅适用于与htaccess文件位于同一目录中的PHP文件.
Note that this setting will only apply to PHP file's in the same directory as the htaccess file.
作为使用url_fopen的替代方法,请尝试使用curl.
As an alternative to using url_fopen, try using curl.
这篇关于使用.htaccess将allow_url_fopen添加到我的php.ini中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!