问题
I have cPanel and I want enable allow_url_fopen
on my host.
When I use this code
if (ini_get("allow_url_fopen") ==1) {
echo "allow_url_fopen is ON";
} else {
echo "allow_url_fopen is OFF";
}
Show me
allow_url_fopen is OFF
回答1:
If your PHP version is under 5.4 you can use the following line of code to set allow_url_fopen to true.
ini_set('allow_url_fopen', '1');
来源:https://stackoverflow.com/questions/42605197/enable-allow-url-fopen-on-cpanel