在 Xampp 之后安装 Zend 框架 [英] Installing Zend Framework After Xampp

查看:42
本文介绍了在 Xampp 之后安装 Zend 框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行的是 Windows 7 并且正在使用 Xampp.我想为 PHP 安装 Zend 框架,但我无法理解如何安装它.我之前使用过 Zend 框架,但它已经安装在我正在使用的 Linux 系统上.

I am running Windows 7 and am using Xampp. I would like to install the Zend framework for PHP, but I am having difficulties understanding how to install it. I have used the Zend framework before, but it was already installed on the Linux system I was working on.

我正在阅读 Zend 文档:http://framework.zend.com/manual/en/learning.quickstart.create-project.html

I am reading through the Zend documentation here: http://framework.zend.com/manual/en/learning.quickstart.create-project.html

我在更新 includes_path 部分时遇到问题.我的原始包含路径是 include_path = ".;C:\xampp\php\PEAR",但我将其更新为 include_path = ".;C:\Zend".

I am having trouble with updating the includes_path portion. My original include path was include_path = ".;C:\xampp\php\PEAR", but I updated it to include_path = ".;C:\Zend".

然后我按照创建新项目的说明打​​开命令行工具并在所需目录中运行 % C:\Zend\bin\zf.sh create project testproject.我收到以下错误消息:'%' 不是内部或外部命令,也不是批处理文件.

I then followed the directions for creating a new project by opening the command line tool and running % C:\Zend\bin\zf.sh create project testproject in the desired directory. I get the following error message: '%' is not recognized as an internal or external command, or a batch file.

对此提供一些帮助将不胜感激.

Some help with this would be greatly appreciated.

推荐答案

C:\Zend\bin\zf.sh 是针对linux的,你需要C:\Zend\bin\zf.bat 我什至不知道你怎么运行它

C:\Zend\bin\zf.sh is for linux, you need C:\Zend\bin\zf.bat I dont even know how you could run it

要设置 ZF,您只需在 include_path

To setup ZF you just need to add C:\Zend\library in your include_path

要修复PHP not found,您需要将 ;C:\xampp\php\ 添加到

To fix PHP not found you need to add ;C:\xampp\php\ to the environment variable "Path" from

点击Start,右键点击Computer,然后点击Properties

Click Start, Right Click on Computer then click Properties

然后高级系统设置>高级选项卡/环境变量>系统变量>路径/编辑...

Then Advanced System settings>Advanced Tab/Environment Variables>System variables>Path/Edit...

然后追加到最后;C:\xampp\php

您还应该附加 ;C:\Zend\bin 以便于访问 zf.bat [2]

You should also append ;C:\Zend\bin for easy access to zf.bat [2]

然后创建项目不要使用cd C:\Zend\bin!!因为您的项目将被创建到该目录中.使用完整路径C:\Zend\bin\zf 创建项目快速入门

Then to create project do not use cd C:\Zend\bin!! because your project will be created into that directory. Use the full path C:\Zend\bin\zf create project quickstart

或者如果您执行了步骤 [2],只需转到您的 htdocs(使用 cd your_htdocs_path)或您在 apache 中为 web root 设置的任何内容并执行 zf 创建项目快速入门

or if you did step [2], simply go to your htdocs (with cd your_htdocs_path) or whatever you set in apache for web root and execute zf create projext quickstart

您可能还需要在 apache 中设置一个虚拟主机quickstart",并且可能需要在 windows hosts 文件中设置新行:127.0.0.1 quickstart 因为 ZF 主要设计用于虚拟主机

you also might need to setup a virtual host "quickstart" in apache and probably new line in windows hosts file: 127.0.0.1 quickstart because ZF is designed mainly for virtual hosts

这篇关于在 Xampp 之后安装 Zend 框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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