以更有效的方式使用 zftool [英] Using zftool in a more efficient manner

查看:24
本文介绍了以更有效的方式使用 zftool的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Zend 的新手,注意到有一种叫做 ZFtool 的东西.所以我通过本教程安装了它:http://framework.zend.com/manual/2.1/en/modules/zendtool.introduction.html.经过一些麻烦和编辑,我终于让它在 xampp 的 htdocs 文件夹中工作.

I'm new to Zend and noticed there's something called ZFtool. So I installed it via this tutorial: http://framework.zend.com/manual/2.1/en/modules/zendtool.introduction.html. With some hassle and editting I finally got it to work in my htdocs folder of xampp.

每当我现在运行 php vendor/zendframework/zftool/zf.php create project testproject 时,它实际上会在我的 htdocs 中创建一个名为 testproject 的项目.但是每当我现在想要添加一个模块时,我都必须执行 php vendor/zendframework/zftool/zf.php create module some_module c:/xampp/htdocs/testproject.

Whenever I now run php vendor/zendframework/zftool/zf.php create project testproject it actually creates a project in my htdocs called testproject. But whenever I now want to add a module I'd have to do php vendor/zendframework/zftool/zf.php create module some_module c:/xampp/htdocs/testproject.

现在;我有一种感觉,这可以(或至少应该)比我现在的方式更有效率.有没有办法让 zf.php 文件普遍可用,或者让命令行更容易一些?

Now; I've got the feeling that this can(or atleast SHOULD) be more efficient than how I'm going at it now. Is there a way I can make the zf.php file universally reachable or anything to make the command line a little easier?

推荐答案

从以下位置下载 zftool.phar:https://packages.zendframework.com/zftool.phar

Download zftool.phar from : https://packages.zendframework.com/zftool.phar

把它放在上面:

C:\bin\zftool.phar

在以下位置创建 zftool.bat:

C:\bin\zftool.bat

zftool.bat

@ECHO OFF
php "%~dp0zftool.phar" %*

将此路径添加到您的环境变量:

Add this path to your Environment Variable:

现在您可以在命令提示符的任何位置使用 zftool,如下所示:

Now you are able to use zftool from anywhere in your command prompt like this:

这篇关于以更有效的方式使用 zftool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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