allow_url_fopen, how to enable

This can be done via your php.ini file by adding the following line:

allow_url_fopen = On

The php.ini file is where you declare changes to your PHP settings. You can edit the existing php.ini, or create a new text file in any subdirectory and name it php.ini.

You can read more about php.ini by clicking Here.

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.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Adjusting the file upload or post size

If you are using a PHP script and want to increase the "post size" or the "size of a file I can...

How to use sendmail with PHP

Here is the magical line of code which tells PHP to send an email through your mail server....

403 Forbidden or No Permission to Access

The top reasons for this error are permissions or .htaccess error. Permissions The 403...

404 error page

404 means the file is not found. If you already uploaded the file, then either the name is...

How to find the correct spelling and path for your files, missing images

When you get a 404 error, check the URL in your browser. This tells you the path and file name...