次のコードを使用しています
echo 'file_get_contents : ', ini_get('allow_url_fopen') ? 'Enabled' : 'Disabled';
これにより、有効または無効にすることができます
しかし、私は関数として関数名を言うようにしたいと思います_isgetcontents
次に、ウェブサイトのコードのどこでも次のように呼び出すことができます
if (_isgetcontents()){
echo "this is enabled"; // will do an action
}else{
echo "this is disabled"; // will do another action
}