How to enable and disable the PHP allow_url_fopen directive

USING THE ALLOW_URL_FOPEN DIRECTIVE

The allow_url_fopen directive is disabled by default. You should be aware of the security implications of enabling the allow_url_fopen directive. PHP scripts that can access remote files are potentially vulnerable to arbitrary code injection.

When the allow_url_fopen directive is enabled, you can write scripts that open remote files as if they are local files. For example, you can use the file_get_contents function to retrieve the contents of a web page.

To enable this functionality, use a text editor to modify the allow_url_fopen directive in the php.ini file as follows:

allow_url_fopen = on

To disable this functionality, modify the allow_url_fopen directive in the php.ini file as follows:

allow_url_fopen = off
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Which nameserver i have to use?

Please use the following nameserver:ns1.flokinet.netns2.flokinet.netns3.flokinet.netns4.flokinet.net

Can i upgrade or downgrade my hosting package?

You can upgrade or downgrade your hosting at any time on the fly without any downtime.An...

Using allow_url_fopen

The allow_url_fopen directive is disabled by default. You should be aware of the security...

Setting up Email Account with Thunderbird

Setting up Email Account with Thunderbird Mozilla Thunderbird is a free, third party email...