JJR512
07-16-2002, 09:02 AM
I have a hack (the Forum News (https://vborg.vbsupport.ru/showthread.php?s=&threadid=41052) hack) which uses file() to connect to a remote file to read it:
$data = implode("",file($filename));
...where $filename is a URL to an XML file on another server.
Right now, there is nothing in place to do anything about it if that remote file can't be found or connected to. It's possible that the remote server might go down, or the path or file name could be changed, or something else.
What happens if this PHP function, file(), can't get the remote file? Should I somehow check to see if the remote file can be connected to first, before the rest of the code tries to run? If so, how? Would @file() do anything?
$data = implode("",file($filename));
...where $filename is a URL to an XML file on another server.
Right now, there is nothing in place to do anything about it if that remote file can't be found or connected to. It's possible that the remote server might go down, or the path or file name could be changed, or something else.
What happens if this PHP function, file(), can't get the remote file? Should I somehow check to see if the remote file can be connected to first, before the rest of the code tries to run? If so, how? Would @file() do anything?