[05-Mar-2012 02:38:58] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/pokerwor/public_html/request.php:275
Stack trace:
#0 /home/pokerwor/public_html/request.php(275): SimpleXMLElement->__construct('')
#1 /home/pokerwor/public_html/request.php(295): readXML()
#2 {main}
thrown in /home/pokerwor/public_html/request.php on line 275
I have a flash file that sends a xml string to php in an interval.
sometimes my php file make this error ,any body knows what is this?
The XML string isn’t valid XML. You should
var_dump()the XML output to see what’s wrong with the input. If you want to handle this error to have friendlier output, you can use a try/catch construction:In the
catchcode you can also add debugging code, such as writing the XML contents to a log file. This way you won’t have to reproduce the rare situation by ramming your refresh button a hundred times.