Zend - 如何在 WAMP 上安装 [英] Zend - How to install on WAMP
问题描述
如果有易于遵循的说明或教程,我可以使用它来学习如何在安装了 WAMP 的机器上安装 Zend?
列出的视频http://www.zendcasts.com/getting-started-with-zend-and-wamp-server/2009/06/
很难读懂他在写什么.
谢谢
从概念上讲,整个事情是:
创建指向示例应用程序的虚拟主机
确保 PHP
include_path
包含 Zend 库的路径.
但如果您不习惯的话,细节可能会很棘手.所以这里至少有一点颜色.
为您的应用创建一个文件夹,类似于
C:\apps\myapp
.复制示例 ZF 应用程序 - 例如 this 或 this - 进入该空间,以便
myapp
文件夹具有典型的子文件夹,例如application
、library
、public
、tests
等在您的 Apache 中创建一个虚拟主机.这是一个两步过程:
3.1 修改您的
hosts
文件 - 在我的 WinXP 机器上,它位于文件夹C:\windows\system32\drivers\etc
中,其中包含类似 的行>127.0.0.1 myvirtualapp
我有意选择一个不同于应用程序文件夹名称
myapp
的虚拟主机名myvirtualapp
,以证明它们在概念上是不同的生物.一个是操作系统和 Apache 识别为 HTTP 主机的名称;另一个是本地文件系统路径.3.2 在 Apache 的 vhost 文件中添加一个条目 - 通常在 Apache 文件夹层次结构中,类似于
conf/extra/httpd-vhosts.conf
.那里的最小条目将如下所示:<虚拟主机 *:80>
DocumentRoot "C:/apps/myapp/public"
服务器名称 myvirtualapp
</VirtualHost>
重启 Apache.
确保将 Zend 库复制到您的
c:\apps\myapp\library
文件夹中,以便有一个名为Zend
的子文件夹,其中包含包含在里面的图书馆的其余部分.确保文件夹
c:\apps\myapp\library
位于您的 PHP 包含路径中.有很多方法可以做到这一点,但通常在c:\apps\myapp\public\index.php
中完成.通常,library
文件夹在index.php
中被引用为realpath(APPLICATION_PATH .'/../library')
.浏览到网址:
http://myvirtualapp/
幸运的话,您应该会看到该应用程序!
If there is an easy to follow instruction or tutorial that I can use to learn how to install Zend on my machine that has a WAMP installation?
The video listed http://www.zendcasts.com/getting-started-with-zend-and-wamp-server/2009/06/
is hard to read what he is writing.
Thank you
Conceptually, the whole thing is:
Create virtual host pointing it to the sample app
Make sure that PHP
include_path
contains the path to the Zend library.
But the specifics can be tricky if you are not accustomed to it. So here is at least a little bit more color.
Create a folder for your app, something like
C:\apps\myapp
.Copy a sample ZF app - like this or this - into that space so that the
myapp
folder has the typical subfolders likeapplication
,library
,public
,tests
, etc.create a virtual host within your Apache. This is a two step process:
3.1 Modify your
hosts
file - on my WinXP machine, it resides in the folderC:\windows\system32\drivers\etc
to contain a line like127.0.0.1 myvirtualapp
I am intentionally choosing a virtual host name
myvirtualapp
that is different from the app folder namemyapp
to demonstrate that they are conceptually different creatures. One is a name that the OS and Apache recognize as an HTTP host; the other is a local filesystem path.3.2 Add an entry into Apache's vhost file - typically in the Apache folder hierarchy at something like
conf/extra/httpd-vhosts.conf
. A minimal entry there will look something like this:<VirtualHost *:80>
DocumentRoot "C:/apps/myapp/public"
ServerName myvirtualapp
</VirtualHost>
Restart Apache.
Make sure that the Zend library is copied into your
c:\apps\myapp\library
folder, so that there is a subfolder namedZend
with the rest of the library contained inside.Make sure that the folder
c:\apps\myapp\library
is on your PHP include path. There are many ways to do this, but typically this is done inc:\apps\myapp\public\index.php
. Usually, thatlibrary
folder is referenced inindex.php
asrealpath(APPLICATION_PATH . '/../library')
.Browse to the url:
http://myvirtualapp/
With any luck, you should see the app!
这篇关于Zend - 如何在 WAMP 上安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!