file_get_contents always returns false

Make sure you have allow_url_fopen enabled in your php.ini
By default this is enabled in PHP, but some hosting providers may disable it due to “security reasons” ( e.g. they want to look cool )

Create empty file only with code


And open it in browser. Then search for allow_url_fopen
If it says Off, you need to change this setting in your hosting.

Write a Comment