Zend - 如何在 WAMP 上安装 [英] Zend - How to install on WAMP

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

问题描述

如果有易于遵循的说明或教程,我可以使用它来学习如何在安装了 WAMP 的机器上安装 Zend?

列出的视频http://www.zendcasts.com/getting-started-with-zend-and-wamp-server/2009/06/

很难读懂他在写什么.

谢谢

解决方案

从概念上讲,整个事情是:

  1. 创建指向示例应用程序的虚拟主机

  2. 确保 PHP include_path 包含 Zend 库的路径.

但如果您不习惯的话,细节可能会很棘手.所以这里至少有一点颜色.

  1. 为您的应用创建一个文件夹,类似于 C:\apps\myapp.

  2. 复制示例 ZF 应用程序 - 例如 thisthis - 进入该空间,以便 myapp 文件夹具有典型的子文件夹,例如 applicationlibrarypublictests

  3. 在您的 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>

  4. 重启 Apache.

  5. 确保将 Zend 库复制到您的 c:\apps\myapp\library 文件夹中,以便有一个名为 Zend 的子文件夹,其中包含包含在里面的图书馆的其余部分.

  6. 确保文件夹 c:\apps\myapp\library 位于您的 PHP 包含路径中.有很多方法可以做到这一点,但通常在 c:\apps\myapp\public\index.php 中完成.通常,library 文件夹在 index.php 中被引用为 realpath(APPLICATION_PATH .'/../library').

  7. 浏览到网址: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:

  1. Create virtual host pointing it to the sample app

  2. 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.

  1. Create a folder for your app, something like C:\apps\myapp.

  2. Copy a sample ZF app - like this or this - into that space so that the myapp folder has the typical subfolders like application, library, public, tests, etc.

  3. 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 folder C:\windows\system32\drivers\etc to contain a line like

    127.0.0.1 myvirtualapp

    I am intentionally choosing a virtual host name myvirtualapp that is different from the app folder name myapp 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>

  4. Restart Apache.

  5. Make sure that the Zend library is copied into your c:\apps\myapp\library folder, so that there is a subfolder named Zend with the rest of the library contained inside.

  6. 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 in c:\apps\myapp\public\index.php. Usually, that library folder is referenced in index.php as realpath(APPLICATION_PATH . '/../library').

  7. Browse to the url: http://myvirtualapp/

With any luck, you should see the app!

这篇关于Zend - 如何在 WAMP 上安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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