How to debug Php code?

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

    If on a localhost, I would suggest using firefox or chrome and installing firebug for mozilla, and chrome gets a default. Be sure that on a local host your settings are matched to the server you are uploading to as this can cause problems when going live.

    Specifically most shared hosting has PHP on safe mode and output buffering off, so if you use it, use it by calling it by calling ob_start(); etc, otherwise you should have no problems, and learning to debug is part of the fun, helps you learn alot :)

    As for php errors just re-edit your php.ini file, you can find al relevant information on http://php.net

    Happy Coding

提交回复
热议问题