[PHP] how catch a warning by file_put_contents() ?

2011-08-19 Thread Andreas
Hi, I wrote stuff with file_put_contents() in a try{} catch{} and it worked. Then I'd like to check what happens when some error occurs so I writeprotected the targetfile. Instead of getting my own message by the catch{} block I got a standard warning in the browser. Can't I catch those

Re: [PHP] how catch a warning by file_put_contents() ?

2011-08-19 Thread Simon J Welsh
On 20/08/2011, at 4:51 PM, Andreas wrote: Hi, I wrote stuff with file_put_contents() in a try{} catch{} and it worked. Then I'd like to check what happens when some error occurs so I writeprotected the targetfile. Instead of getting my own message by the catch{} block I got a standard

Re: [PHP] how catch a warning by file_put_contents() ?

2011-08-19 Thread Adam Richardson
On Sat, Aug 20, 2011 at 1:23 AM, Simon J Welsh si...@welsh.co.nz wrote: On 20/08/2011, at 4:51 PM, Andreas wrote: Hi, I wrote stuff with file_put_contents() in a try{} catch{} and it worked. Then I'd like to check what happens when some error occurs so I writeprotected the targetfile.