Hi, before working with yii2, i used to code regular php with jquery ajax.
the php file will return response string using this code
When the jquery $.post executed, if there are any error in the php file , those error will be return as part of response string. I can view the error by executing alert(response) or console.log(response) in callback function success().
Working with yii2, i use the same script. But ‘url for php file’ is replace with baseUrl/controller/action. The script work as intended.
But if there are any error in the controller/action method, the callback function success() wont be executed.
So how to view the php error in controller/action method after jquery $.post executed?