0

近2天一直在挠头。我已经下载了“Zend Framework 2.0.6 Minimal”。我正在尝试将其设置为使用"Wamp Server 2.2E"工作。

因为我没有在 ZendFramework bin文件夹中找到 CLI 工具,所以我从这里下载了zf.batzf.php , 我将它们放在我的 wamp PHP 文件夹中(因为我已经有了它的路径视窗)

我还在我的php.ini文件中映射了库路径,该文件位于 wamp 上,因此它将是这样的:D:\wamp\bin\php\ZendFramework\library

现在,当我打开 Windows PowerShell 并键入 zf 时,我收到以下错误:

***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path.  There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.

The easiest way to get the zf command running is to give it the include
path via an environment variable ZEND_TOOL_INCLUDE_PATH or
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
then run the command "zf --setup".  This command is designed to create
a storage location for your user, as well as create the zf.ini file
that the zf command will consult in order to run properly on your
system.

Example you would run:

$ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup

Your are encourged to read more in the link that follows.
Zend_Tool & CLI Setup Information
(available via the command line "zf --info")
   * Home directory found in environment variable HOMEPATH with value \Users\Shahar Galukman
   * Storage directory assumed in home directory at location \Users\Shahar Galukman/.zf/
   * Storage directory does not exist at \Users\Shahar Galukman/.zf/
   * Config file assumed in home directory at location \Users\Shahar Galukman/.zf.ini
   * Config file does not exist at \Users\Shahar Galukman/.zf.ini

To change the setup of this tool, run: "zf --setup"

因此,即使所有路径似乎都井井有条,但我仍然收到此错误。

我在安装 CLI 时使用了Zend 指南

并且还发现了一个问题here,它的答案对我没有帮助

我还应该做什么?Zend 框架 2.0.6 甚至可以使用 CLI 吗?是否有另一种解决方案来管理和舒适地使用 Zend 框架?

感谢您提供的任何帮助,沙哈尔

4

1 回答 1

3

Zend Framework 2 没有 Zend Framework 1 那样的 CLI 工具。它仍在开发中,可能会也可能不会很快发布。ZF1 工具不适用于 ZF2!这就是为什么它毕竟不包括在内的原因;)

于 2013-01-06T00:52:25.713 回答