zftool 未按预期运行 [英] zftool not behaving as expected

查看:31
本文介绍了zftool 未按预期运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 linux 中有一个托管服务,我正在尝试在 zend 框架 2 上开发一个应用程序.我想使用 zftool 但无论我运行哪个 zftool 命令,我总是得到主页的 HTML.

I have a hosting service in linux, where I’m trying to develop an app on zend framework 2. I want to use zftool but regardless which zftool command I run, I get always the HTML of the home page.

我非常感谢您的帮助.

以下是重现的步骤:

1 - 我安装了 Composer

1 - I installed composer

>curl -s https://getcomposer.org/installer | php

2 - 我安装了 Skeleton MVC 应用程序

2 - I installed the Skeleton MVC application

>php composer.phar create-project -sdev --repository-url="https://packages.zendframework.com" zendframework/skeleton-application ./hmzf

3 - 更新 Composer

3 - Brought Composer up to date

>php composer.phar self-update

4 - 安装 ZFTool

4 - Install ZFTool

>php composer.phar require zendframework/zftool:dev-master

5 - 创建一个符号链接以从我的项目目录中调用它

5 - Createa symbolic link to invoke it from my project directory

>ln -s ./vendor/zendframework/zftool/zf.php zf.php

6 - 运行 zf.php 以获取模块列表,我得到的回报是骨架应用程序主页的 html:

6 - Run zf.php to get the list of modules and what I get in return is the html of the home page of the skeleton app:

> php zf.php modules

推荐答案

我发现了这个问题.我不得不使用 php-cli 来调用 zf.php.所以,而不是发布:

I found the issue. I had to use php-cli to invoke zf.php. So instead of issuing:

php zf.php 模块

php zf.php modules

这会将 zend 应用主页 HTML 回显到控制台,我不得不发出:

which will echo the zend app home page HTML to the console, I had to issue:

php5.4-cli zf.php 模块

php5.4-cli zf.php modules

并且我从该工具中得到了正确的响应,即:

and I've got the right response from the tool, which is:

安装的模块:申请

这篇关于zftool 未按预期运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆