How to debug Php code?

前端 未结 10 1911
臣服心动
臣服心动 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:44

    PHP produces an error_log file in its directory whenever a problem occurs, you can find debug information there.

    Also, try using var_dump($someVarible). This will give you useful information about the current state of a variable - often better than echo.

提交回复
热议问题