How to debug Php code?

前端 未结 10 1920
臣服心动
臣服心动 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 04:02

    You can use error_reporting() at the top of your code...

    error_reporting(E_ALL);
    

    You will also want display_errors on in php.ini.

    Note that you should have public facing error reporting off in a production environment.

提交回复
热议问题