您的位置:首页 > 运维架构 > Apache

Zend Studio 如何配置本地apache服务器使用xdebug调试php脚本

2011-03-29 16:18 441 查看
本地环境搭配:
apache 2.2 安装位置:D:/program files/Apache Software Foundation/Apache2.2
php 5.2.10 安装位置:C:/php
xdebug已经安装并配置好
zend studio 安装位置:D:/program files/Zend/Zend Studio - 7.0.0
zend studio 默认workbench安装位置:C:/Users/Fred/Zend/workspaces/DefaultWorkspace7

配置apache,修改httpd.conf文件,在文件的最后添加:

Alias /Workspace "C:/Users/Fred/Zend/workspaces/DefaultWorkspace7"

<Directory "C:/Users/Fred/Zend/workspaces/DefaultWorkspace7">

Options Indexes MultiViews ExecCGI

DirectoryIndex index.php

AllowOverride None

Order allow,deny

Allow from all

</Directory>

/Workspace这个名字随你喜欢改变
C:/Users/Fred/Zend/workspaces/DefaultWorkspace7这个和你的zend studio默认的workbench位置相对应

接下来配置zend studio。打开zend studio => Window => Preferences => PHP
PHP Executables => Add,如下所示设置(name可以随便起名字,但是之后的debug设置里面必须和这个name对应):





PHP Servers => New,如下所示设置:





注意URL栏中添加了Workspace,这个是在httpd.conf中添加的目录别名。

PHP Debug,如下图所示,选择合适的Debugger,Server:



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: