php调试备忘
php 调试配置其实很简单,以下只是做一个备忘。
1.ide 使用eclipseForPHP。首先下载一个 php_xdebug-2.2.3-5.4-vc9.dll,并在php.ini里面增加:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable =1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
xdebug.remote_mode = "req"
xdebug.auto_trace = On
xdebug.show_exception_trace = On
xdebug.remote_autostart = On
这样就为php增加了调试功能。
2.在eclipseForPhp里面的首选项里面,首先在PHP Executable 里面配置php.exe的位置和php.ini的位置,然后在php debuger处选择xdebug。
这样就把具有调试功能的php执行环境加到eclipseForPhp里面来了。
3.在php-debug处首先在PHP Debuger处选择 XDebug,然后在PHP Excutable处选择在上一步配置的php执行环境。
这样phpForEclipse就具有了调试php 脚本的功能。调试时,选择整个php项目右键,配置一个PHP Script配置,
RunTime PHP处 选中Alternate PHP,下拉框选择之前配置的php执行环境,然后在PHP File处选择要调试的php脚本即可。
4.如果要进行PHP Web Page 调试,则需要在首选项的PHP Servers处配置一下默认的PHP Web Server,
Server 选项卡 中 选择一个标识名称,然后,在下面输入访问web root的 http 地址,(这里需要特别注意一下,
一般在操作时,需要修改apache的httpd.conf文件中的DocumentRoot 和
例如有个 项目名称是weixin,那么这样配置以后启动apache后,我们需要通过http://localhost:8080/weixin来访问这个项目,实际上访问的是E:/ws
/weixin下面的php文件。)
输入的web root的 http 地址是类似:http://localhost:8080这样的 ,然后在 Path Mappping选项卡里面,输入访问该项目的具体的url路径和该项目在工作空间的路径位置,例如:Path On Server 是 http://localhost:8080/weiqin ,Path In WorkPlace 是 /weiqin,。
这样,我们就可以使用 Web Page调试了。Web Page 调试时,右键项目,选择Debug->PHP Web Page,增加一个新的配置。
Server Debugger 选择XDebug,PHP Server选择 Default PHP Web Server,然后在File 里面 选择要调试的文件 即可调试了。

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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
