如何在Eclipse中调试php

如何在Eclipse中调试php,php,eclipse,Php,Eclipse,我是PHP新手。。。。。 (在Eclips IDE中)如果我使用run As-->“PHP脚本”运行PHP代码,这将正常工作,但run As-->“PHP网页”会抛出错误 Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is

我是PHP新手。。。。。 (在Eclips IDE中)如果我使用run As-->“PHP脚本”运行PHP代码,这将正常工作,但run As-->“PHP网页”会抛出错误

Object not found!
The requested URL was not found on this server. 
If you entered the URL manually please check your spelling and try again. 

If you think this is a server error, please contact the webmaster. 

Error 404
localhost
03/22/11 12:04:12
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 
OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 
请帮帮我。。。。
Gnanendra

您是否使用任何XAMPP或WAMP服务?你把文件放好了吗?它说apache找不到你的文件。i、 e.您没有正确配置环境,或者您的文件位于错误的位置

如果您正在使用XAMPP,请将eclipse项目工作区放在
XAMPP\htdocs\
文件夹中。如果使用WAMP,请将其放入
WAMP\www\
文件夹中。您将在安装它的目录中找到XAMPP或WAMP文件夹

供参考:

是的,我已经安装了XAMPP,其中包含Apache、MySql和php。您的文件一定位于错误的位置。它在htdocs目录下。您的eclipse工作区也需要在这里设置。是的,我的eclipse工作区不在htdocs目录下,它位于“C”驱动器之外的另一个目录下。请告诉我htdocs目录的路径。您也可以在XAMPP中设置htdocs的路径。所以你不必移动你的Eclipse项目…你可以问这个问题:我以为var_dump是PHPCan的调试器。我可以在htdocs目录(文件夹)中有1个以上的项目吗?是的,如果它们都在不同的目录中,你可以在htdocs中有多个项目。例如:运行每个项目;在浏览器中键入目录名,。。。。