Why did error_log make a mistake in php?

Front-end ios, back-end php, I added:
error_log ($msg, 3, "error.log") where I wanted to print the error message;
found that the front end reported an error, saying that the correct json information was not returned, and this sentence was normal as soon as it was removed.
I don"t record the error log of php, so I can"t see what the error message is. Why?

Php
May.07,2021

should not be caused by error_log , unless your error.log file does not have write permission.
it is recommended that you check whether this file is writable, and then debug the front end to see what information is returned on the server side.


should be an error at the back end, the program interrupts execution, and there is no request for a return value to the front end.
it's easy to locate the problem by looking at the error log that php is running.

Menu