Bu uyarıları çekecektir try catch çeşit yapmak mümkün mü?
örneğin
if (!$dom->loadHTMLFile($url)) {
//if cant load file handle error my way
}
Için $url
Ben alıyorum kullanıyorum
Warning (2): DOMDocument::loadHTMLFile(MYURL) [domdocument.loadhtmlfile]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden
[APP\controllers\import_controller.php, line 62]
Warning (2): DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: I/O warning : failed to load external entity "hMYURL" [APP\controllers\import_controller.php, line 62]
I could just suppress the error, and do something if the call returns false but I want to be able catch the exact warning message and then do something with it.
Is this possible?
Teşekkürler