How to view PHP errors while debugging jQuery Mobile?

I have an error in my PHP code that handles submitting a form in my jQuery mobile app. When I submit the form, the word "Undefined" appears on the page, which makes sense since jQuery Mobile does not return the full page.

This question summarizes this problem. Why do I see the value "undefined" on the screen when submitting a form in jQuery Mobile?

My question is, how can I view the resulting PHP error? I do not have access to the PHP error log file because I am developing it on a shared server. jQuery Mobile simply puts "Undefined" on the screen and does not display an error message.

+4
source share
1 answer

A form representing the likely defaults for using Ajax. You can force a new page request by specifying data-ajax="false" as an attribute in the form element. This can help you see what PHP displays on the page (if any).

If PHP doesn’t write errors on the page by default, you can use a combination of ini_set('display_errors', 1) and error_reporting function to display them as you wish.

+2
source

Source: https://habr.com/ru/post/1399906/


All Articles