Re: [PHP] Exception handling with file()

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 6:34 am, John Papas wrote: > I need to open a remote file with file() and I would like to put it > inside a try-catch but as far as I can tell file() does not raise an > exception if it fails. The following code: > > try { > $data = file('http://myserver.com

Re: [PHP] Exception handling with file()

2008-02-11 Thread Zoltán Németh
2008. 02. 11, hétfő keltezéssel 14.34-kor John Papas ezt írta: > I need to open a remote file with file() and I would like to put it > inside a try-catch but as far as I can tell file() does not raise an > exception if it fails. The following code: > > try { > $data = file('http://m

[PHP] Exception handling with file()

2008-02-11 Thread John Papas
I need to open a remote file with file() and I would like to put it inside a try-catch but as far as I can tell file() does not raise an exception if it fails. The following code: try { $data = file('http://myserver.com/myfile.txt'); $date = substr($data, 0);