php 如何在eclipse中运行php脚本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/888500/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to run php script in eclipse
提问by user90714
I installed Eclipse PDT-all-in-one-win32-2.0.0GA and WampServer 2.0.
我安装了 Eclipse PDT-all-in-one-win32-2.0.0GA 和 WampServer 2.0。
I try to run as PHP Script in eclipse but I have this error:
我尝试在 Eclipse 中作为 PHP 脚本运行,但出现此错误:
"The current debugger does not have any defined PHP executable."
“当前的调试器没有任何定义的 PHP 可执行文件。”
How do I create this .exe ??
我如何创建这个 .exe ?
采纳答案by mtasic85
Ok But I do not have php.exe. I only create Test.php in my project.
好的,但我没有 php.exe。我只在我的项目中创建 Test.php。
In order to run **.php* files, you will need PHP installed, and because you already have installed WAMP, you should be fine.
为了运行 **.php* 文件,您需要安装 PHP,并且因为您已经安装了 WAMP,所以应该没问题。
"The current debugger does not have any defined PHP executable."
“当前的调试器没有任何定义的 PHP 可执行文件。”
If you have installed WAMP as you said, try to look for php.exeon your local hard drive and then set path in Eclipse that leads to it (eg. c:\wamp\bin\php\php5.2.9-2\php.exe). Go to Window\Preferences\PHP\PHP Executablesand add this path to the list.
如果你已经按照你说的安装了 WAMP,请尝试在本地硬盘驱动器上查找php.exe,然后在 Eclipse 中设置通向它的路径(例如c:\wamp\bin\php\php5.2.9-2\php .exe)。转到Window\Preferences\PHP\PHP Executables并将此路径添加到列表中。
回答by Jeroen
You do not need to create this .exe
您不需要创建此 .exe
In Eclipse you need to configure the debugger settings. The debugger needs to know where the php.exe file lives.
在 Eclipse 中,您需要配置调试器设置。调试器需要知道 php.exe 文件所在的位置。
Edit: php.exe ships with the standard PHP install on windows. When you download PHP from www.php.netyou will find the php.exe file somewhere in the directory you installed PHP in.
编辑:php.exe 随 Windows 上的标准 PHP 安装一起提供。当您从www.php.net下载 PHP 时,您会在安装 PHP 的目录中的某处找到 php.exe 文件。
Hope this helps :-)
希望这可以帮助 :-)

