How to debug Php code?

前端 未结 10 1921
臣服心动
臣服心动 2020-12-08 03:20

I am newbie on PHP. Here is my situation. I write my code in vim and put it under /var/www/ then I can use

localhost/*.php

10条回答
  •  广开言路
    2020-12-08 03:45

    Use these two lines to debug (this will enable to find the errors on the line numbers):

    ini_set('display_errors', 'On');
    error_reporting(E_ALL | E_STRICT);
    

提交回复
热议问题