How can I find errors in php scripts? I am learning php and use the Editra editor. when I run html, I often find that php scripts have no errors or execution results, how can I find out where the php script is wrong? I have added die or echo to every function in the script, and there is often no output in the content of die and echo. Is there any tool or method that can indicate which line is wrong or what is wrong? Or can I debug the php script? ---- How can I find errors in php scripts?
I am studying php and use the Editra editor. when I run html, I often find that there is no error or execution result in the php script. how can I find out where the php script is wrong? I have added die or echo to every function in the script, and there is often no output in the content of die and echo. Is there any tool or method that can indicate which line is wrong or what is wrong?
Or can I debug the php script?
------ Solution --------------------
Enable error display.
X-debug can debug php
------ Solution --------------------
Error_reporting (E_ALL );
------ Solution --------------------
How can I find out where the php script is wrong? Modify php. ini error_reporting = E_ALL &~ E_NOTICE: Restart the server.
I have added die or echo to every function in the script, and there is often no output in the content of die and echo. (I'm afraid this does not exist.) we recommend that you use a better browser, google chrome.
------ Solution --------------------
Just make sure that your syntax is correct or not.
Normally, there is no problem.
------ Solution --------------------
Discussion
Enable error display.
X-debug can debug php
------ Solution --------------------
An error is prompted. How to write your code.
------ Solution --------------------
Enable the error display function: set display_errors = Off in php. ini to a semicolon and change it to On
Enable the error level. Generally: error_reporting = E_ALL &~ You can also change E_NOTICE to another one.
------ Solution --------------------
In development mode, if you are not so sure about your code, open the error prompt.
Second, it is also very beneficial to change an Intelligent ide editing tool.
At last, we installed some auxiliary tool kits such as xdebug to improve the development efficiency and the error shooting progress.
In linux, it is still very easy to place an order for debugging or anything. in the past, I did not succeed in how to configure it in Windows.