php环境配置及调试配置的方法
php环境配置及调试配置的方法
今日打算学习PHP,工具还是使用我熟悉的eclipse。为了php环境的配置和调试配置,我花了很大功夫研究哈,以下是整理出来的方法:
1.安装和配置PDT
下载PDT: download.eclipse.org/tools/pdt/downloads/index.php, 选择最新版本
PDT是Eclipse的插件。
选择pdt-all-in-one版本, 否则需要另外下载eclipse和相关插件, 并手工集成.
2.安装debug环境
由于我用的是最新的xampp1.7.2,试了二天xdebug,出现如下如题:waiting for xdebug session,停止的了57%的进度上,程序无法调试。可能是xdebug和php5.3之间的问题。因此决定改用旧版xampp1.6.8,php的版本是5.2.6。结果还是出现了以上问题,让我不得其解,不得以,换成zend debugger。
xampp版本为1.6.8,从这里下载zend debugger 5.2.x。将文件解压后复制到\xampp\php\ext目录。
打开\xampp\apache\bin目录下的php.ini。的最后添加:
zend_extension_ts = "c:\xampp\php\ext\ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1/10,192.168.88.146
zend_debugger.expose_remotely=always
其中192.168.88.146是你机子上的IP地址。
3.设置PDT下的debug环境
启动Eclipse,将code目录设置为"xampp\htdocs",这样代码直接放到apache的WEB目录下
从主菜单打开"Window > Preferences > PHP",
先选中"PHP Excutables"节点,在右面的面板点"Add"按钮,在接下来的窗口中,
选中"Debug"节点,在右面的面板中,
"PHP Debugger"选择XDebug,
"Server"不用变
"PHP Executable"也选择你刚刚添加的那个"xampp-zend"
在PHP Debug透视图中可以点击Debug View中的图标或用快捷键来进行单步跟踪,比如:
F5: 单步跳入(可以跳入require()函数来跟踪到别的PHP文件哟)
F6: 单步跳过
F7: 单步跳出(可以从被require()的文件内跳回调用者哟)
F8: 继续执行(直到遇到下一个断点)
Ctrl+R: 执行到光标所在行(除非遇到断点)

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

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



Safely handle functions and regular expressions in JSON In front-end development, JavaScript is often required...

Is Kotlin worth learning? Does Android development require Kotlin? Many Android developers will have questions when using Java for development: Kotlin language...

How to implement conditional control in the code to avoid unnecessary input operations? During the programming process, sometimes we need to control the code based on certain conditions...

Key considerations and implementation steps for migrating data from local special projects to a unified construction system When local special projects need to migrate data to a unified construction system...

South Korean court sentenced three people to prison for cryptocurrency scams. South Korea's Busan District Court recently made a verdict on a complicated cryptocurrency fraud case, and the three main culprits were sentenced to jail for fraudulent investors of 110 million won (about 416,000 US dollars). The court found that the three people used the fake "exclusive trading algorithm" as bait and promised a huge monthly return of 30% to defraud many victims. This algorithm does not actually exist, it is a tool used to commit fraud. The three defendants (published by last names only: Kim, Lee and Joe) used the public's enthusiasm for cryptocurrencies to fabricate lies from a global trading network to attract investors. The main culprit Jin was sentenced to four and a half years in prison, while Li and Qiao were sentenced to three and a half years in prison respectively. The judge pointed out that their behavior was severe

This article summarizes the information of the top ten virtual currency trading apps including Binance, Ouyi and Sesame Open Door, but for security reasons, the URL is not provided directly. Instead, it emphasizes the importance of safe access to the official platform through trusted channels and provides verification methods. At the same time, the article reminds investors to consider factors such as security, transaction fees, currency selection when choosing an APP, and pay attention to the risks of virtual currency trading.

The top ten leading virtual currency trading apps in the world in 2025 are: 1. Binance, 2. Gate.io, 3. OKX, 4. Huobi Global, 5. Bybit, 6. Kraken, 7. FTX, 8. KuCoin, 9. Coinbase, 10. Crypto.com.

The world's leading ten digital currency apps include: 1. OKX, 2. Binance, 3. Huobi, 4. Matcha (MXC), 5. Bitget, 6. BitMEX, 7. Pionex, 8. Deribit, 9. Bybit, 10. Kraken. These platforms have their own characteristics in security, transaction services, technical architecture, risk control team, user experience and ecosystem.
