0

嘿伙计们,我需要你的帮助来设置 zendframe 工作的环境吗?我已经在 D:/program files/netbeans 下的 D: 驱动器中安装了我的 netbeans。而zend框架在D:驱动下。我的 wamp 包安装在 c:/wamp 下。现在我需要为我的开发配置这些?

我一整天都在搜索谷歌、stackoverflow 和每个博客。但我得到的只是下面给出的错误。

'"php.exe"' 不是内部或外部命令、可运行程序或批处理文件。

告诉我如何解决这个问题?我应该怎么办 ?我需要将所有这些设置在一个屋檐下还是我需要升级我的 PHP 版本???

是的,我的配置写在下面。

WAMP 服务器 2.0c 与 PHP 5.2.6、MySQL 5.0.51b、Apache 2.2.8。

Netbeans 7.1.1 和 Zend 框架 1.11.11

4

3 回答 3

3

将 php.exe 添加到环境变量 PATH。如果将安装 php.exe 的目录添加到 PATH 环境变量中(可能需要注销才能生效),它应该可以工作。

看这个教程

于 2012-04-27T14:45:43.593 回答
1

首先更新到最新版本的 PHP。

然后,确保 PHP 在您的环境 PATH 变量中。你可以在谷歌上查找如何做到这一点。

完成该设置后,您也必须安装 phpunit。WAMP 可能会附带它,但我对此表示怀疑。如果你有梨,通常这很容易。您可以从 phpunit 站点获取 pear 命令。

如果您没有梨,则必须安装它。下载适合您的“go-pear.phar”文件。您通常通过运行来安装它php go-pear.phar' and then you can use pear it install phpunit.

You can then call it a day OR you can continue setting up Netbeans to automatically use phpunit.

If you don't setup netbeans then you'll have to just use phpunit on the command line.

After the pear phpunit install just run phpunit on the command line and you should get some sort of 'help' output.

Edit : Step by step details.

I'm going to assume you have xdebug, php, netbeans installed from your comments. It seems like your only issue is installing phpunit.

Here goes.

  1. Open up a command prompt

  2. Open a browser window.

  3. In your browser go to http://pear.php.net/go-pear

  4. Save the text file that comes up into the directory php is installed in.

  5. Go to the php directory php is installed in via the cd command on the terminal.

  6. Type in the command php go-pear.phar

  7. Follow the installation instructions for pear and pick the options that make the most sense. I just install everything in the php directory so php and pear live in the same place.

  8. After pear is installed type in the following commands ( from the phpunit install website : http://www.phpunit.de/manual/current/en/installation.html ) You might have to use sudo here, if you're on windows maybe not.

    pear config-set auto_discover 1

    pear install pear.phpunit.de/PHPUnit

9 Run phpunit -h在命令行上,你应该得到一些帮助信息。如果您在 Windows 上,您可能必须在尝试之前打开一个新的命令行提示符。

于 2012-04-27T16:15:20.800 回答
1

您实际上可以在Options - PHP - General选项卡中指定 Netbeans 中 PHP 解释器的路径。

也许您也应该设置 include_path 以使 Zend 模块(至少自动加载一个)可识别。

于 2012-04-27T14:50:03.217 回答