PHP调试有很多中方法。今天给大家推荐的是 FirePHP 这个工具,是基于firefox的一个组件。Firephp组件安装地址。使用之前需要先安装下这个组件。完了还需要down一个FirePHP的包。
PHP调试有很多中方法。今天给大家推荐的是 FirePHP()。
这个工具,是基于firefox的一个组件。。使用之前需要先安装下这个组件。完了还需要down一个FirePHP的包。。
下载完成后可以看到包里的文件如下:
我们现在来写个例子测试下。(需要include 进来fb.文件哦)代码如下:
我们在firefox下运行。结果如下:
在这里就可以看到$str的值了。
接下来来介绍下FirePHP的几个常用方法:
1、 fb($para) 该方法就是如上示例。可以监测某个变量的值。该方法等同于FB::log($para)。
2、 FB:: info ($str); 该方法和fb()方法类似。不同的地方在于其运行结果在firefox中会有个不同的标志。(见图三)
3、 FB::warn($str); 同上类似。
4、 FB::error($str); 同上类似。
图三
5、 FB::trace($str); 该方法用于监控变量的调用栈。如下图示例。
我们也可以在类中使用FB。如下示例:
运行结果如下:
在fb.中,我们可以看到有如下多的方法,在这里就不一一介绍了。主要常用的就是上面五个。有兴趣的同学可以仔细去研究测试下其他方法。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software