вот код:
if( false == (file_get_contents($jsonaddress)))
{
//error
print ('Error with stream, getting file instead !<br />');
$jsonaddress = 'listedesodeurs.txt';
}
else
{
//noerror
print ('Sucessfully GET data from JSON stream<br />');
$jsoncontent = file_get_contents($jsonaddress);
$size = file_put_contents('listedesodeurs.txt', $jsoncontent);
echo ('Making backup of stream in file : '.round(($size/1024),0).' KB <br />');
}
Когда file_get_contents = true (без ошибок) все выздоравливает
когда file_get_contents = false, я получаю большое сообщение об ошибке на экране ... я просто хотел проверить его, а не выполнить!
КАК?
вот сообщение об ошибке:
[function.file-get-contents]: failed to open stream: Inappropriate ioctl for device in