安装 Zend 框架
我一直在浏览此页面以在本地计算机上安装 zend 框架。
http://framework.zend.com/manual/en/zend .tool.framework.clitool.html
我无法让它识别终端“zf show version”中的命令,它不断地返回给我,提示找不到命令。我确实在这台机器上安装了 xampp,每次运行命令“which php”时,它都会显示我的 xampp 文件夹,当我运行 php-i|grep include_path 时,它会显示 xampp 的包含路径。我可以在浏览器上访问 Zend Server,查看包含路径、安装路径等。/usr/local/zend/share/ZendFramework..我可以看到 zf.php 和 zf.sh 所在的位置。我已经安装了正确的库。我只想能够从命令行访问我的 zf 但它不允许我这样做。这是因为xampp吗?我真的很困惑。这是我关于堆栈溢出的第一篇文章:-)
I have been going through this page to install zend framework on my machine locally.
http://framework.zend.com/manual/en/zend.tool.framework.clitool.html
I can't get it recognize the command in my terminal "zf show version", it keeps coming back to me with command not found. I do have xampp installed on this machine and everytime I run the command "which php" it brings up my xampp folder and when I run php-i|grep include_path it brings up the include path from xampp. I can go to the Zend Server on my browser and see the include path, install path, etc. /usr/local/zend/share/ZendFramework..I can see where zf.php and zf.sh are. I have the proper libraries installed. I just want to be able to access my zf from the command line and it's not allowing me to. Is this because of xampp? I'm really confused. This is my first post on stack overflow :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过转到位于根目录中的 bashrc 文件来完成此工作。因此,在终端中输入 cd /.. 到根目录,然后输入 cd /etc。只需打开该 bashrc 文件并添加一个别名...alias zf='zf.sh',然后在终端中执行 source bashrc 即可完成设置。基本上我在这里学到的是,您想要使用任何快捷方式而不是长路径,您必须在 bashrc 文件中为它创建一个别名,以便它在终端中工作。也许还有另一种方法,但这对我有用
I got this working by going to my bashrc file located in the root. So in the terminal type cd /.. to the root and then type cd /etc. Just open that bashrc file and add an alias... alias zf='zf.sh', then do source bashrc in your terminal and you should be setup. Basically what I learned here is that any shortcut that you want to have instead of the long path, you have to make an alias for it in the bashrc file in order for it to work in the terminal. Maybe there is another way, but this is what worked for me
我的第一个 Zend 项目运行起来有点痛苦。经过一段时间的尝试让 simlink(符号链接)正常工作。我最终导航到我想要设置项目的文件夹,并通过输入整个路径
或类似的内容来运行 zf.sh
My first Zend project was kind of a pain to get running. After a while of trying to get the simlink (symbolic link) to work. I ended out navigating to the folder where I want to setup my project and got the zf.sh running by entering the whole path
or something like that