When I access xml, there is error message like this :
<ErrorMSG>Credit limit exceed. Booking cannot be proceed. </ErrorMSG></Response>
I want save the error message in log file
How to save xml error message in log file?
Thank you
When I access xml, there is error message like this :
<ErrorMSG>Credit limit exceed. Booking cannot be proceed. </ErrorMSG></Response>
I want save the error message in log file
How to save xml error message in log file?
Thank you
You might want to look at file_put_contents() if you want something super quick:
file_put_contents('<path to log file>', $stringInput, FILE_APPEND);
Where "path to log file" is the path + name of the file you want to write to, and $stringInput is the string representation of the error. FILE_APPEND is a flag so that every time you call file_put_contents(), a new line gets added to the file rather than rewriting the file.
As an alternative, check out log5php which gives more control.