第8章ZendFramework框架.PDFVIP

  • 3
  • 0
  • 约2.21万字
  • 约 13页
  • 2017-08-15 发布于上海
  • 举报
第8章ZendFramework框架

第 8 章 Zend Framework 框架 随着 Web 技术的发展,传统的编程模式已经越来越不能满足日益快速的技术发展。近些年来,一 些致力于整合功能的框架技术蓬勃的发展起来。例如,Microsoft 的.Net 技术就是框架开发的一个成功典 范。对于PHP 而言,Zend 公司也为其构建了框架,称为Zend Framework 。目前该产品尚在测试阶段, 目前的最新版本为0.1.5,本章将以该版本为例简要介绍Zend Framework 的使用方法。 8.1 Zend Framework 的安装 Zend Framework 可以从其官方网站/下载到,最新版本为0.1.5,该版本需 要PHP 5.1.4 以上版本的支持。下载后的安装步骤如下所示。 (1)解压缩下载的压缩包到一个专门的文件夹,例如C:\PHP\ZF\ 。 (2 )修改PHP 安装目录下的php.ini 文件,将Zend Framework 的安装目录添加到include_path 参数 中,如下所示。 ; Windows: \path1;\path2 include_path = .;c:\php\includes;c:\php\ZF\library 这样,在调用Zend Framework 时可以直接通过文件名来调用。 (3 )修改Apache 安装目录下conf 文件夹中的httpd.conf 文件,修改mod_rewrite 行使其有效,修 改后的代码如下所示。 LoadModule rewrite_module modules/mod_rewrite.so 这是因为Zend Framework 需要Apache 的mod_rewrite 模块支持。在启动Apache 的时候需要加载着 个模块。 (4 )修改Apache 安装目录下conf 文件夹中的httpd.conf 文件,使AllowOverride 的值为All ,如下 所示。 # # This should be changed to whatever you set DocumentRoot to. # Directory C:/Program Files/Apache Software Foundation/Apache2.2/htdocs # # Possible values for the Options directive are None, All, # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that MultiViews must be named *explicitly* Options All # doesnt give it to you. # # The Options directive is both complicated and important. Please see # /docs/2.2/mod/core.html#options # for more information. ·454 · PHP 开发大全 # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be All, None, or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All # # Controls who can

文档评论(0)

1亿VIP精品文档

相关文档