如何在eclipse中运行php脚本

时间:2023-01-17 19:07:12

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 ??

2 个解决方案

#1


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.exe on 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 Executables and add this path to the list.

如果您已按照说明安装了WAMP,请尝试在本地硬盘驱动器上查找php.exe,然后在Eclipse中设置导致它的路径(例如c:\ wamp \ bin \ php \ php5.2.9-2 \ php 。可执行程序)。转到Window \ Preferences \ PHP \ PHP可执行文件并将此路径添加到列表中。

#2


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.net you 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 :-)

希望这可以帮助 :-)

#1


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.exe on 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 Executables and add this path to the list.

如果您已按照说明安装了WAMP,请尝试在本地硬盘驱动器上查找php.exe,然后在Eclipse中设置导致它的路径(例如c:\ wamp \ bin \ php \ php5.2.9-2 \ php 。可执行程序)。转到Window \ Preferences \ PHP \ PHP可执行文件并将此路径添加到列表中。

#2


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.net you 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 :-)

希望这可以帮助 :-)