ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:52.27KB ,
资源ID:24693292      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/24693292.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Zend Freamwork配置源码.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

Zend Freamwork配置源码.docx

1、Zend Freamwork 配置源码配置目录Zend 框架就放在library中。根目录.htaccess 文件内容RewriteEngine onRewriteRule .* index.phpphp_flag magic_quotes_gpc offphp_flag register_globals offapplication 目录下.htaccess文件内容deny from allindex.php 127.0.0.1, username = root, password = root, dbname = zend, charset= utf8 );$db = Zend_Db:fa

2、ctory(PDO_MYSQL,$params);Zend_Db_Table:setDefaultAdapter($db);/设置控制器$frontContraller = Zend_Controller_Front:getInstance();$frontContraller - throwExceptions(true);$frontContraller - setControllerDirectory(./application/controllers);/Acl$acl = new Zend_Acl();$acl-addRole(new Zend_Acl_Role(guest);$ac

3、l-addRole(new Zend_Acl_Role(user),guest);$acl-addRole(new Zend_Acl_Role(admin),user);$acl-add(new Zend_Acl_Resource(index);$acl-add(new Zend_Acl_Resource(work);$acl-add(new Zend_Acl_Resource(admin);$acl-allow(guest,index);$acl-allow(user,work);$acl-allow(admin);$privalege = $acl-isAllowed(guest,inde

4、x) ? allow : denied;if($privalege = denied) exit(Denied);/$frontContraller -dispatch();?_IndexController.phpinitView(); $this-view-baseUrl = $this-_request-getBaseUrl(); Zend_Loader:loadClass(Album); function indexAction() $this-view-title = My Albums; $album = new Album(); $this-view-albums = $albu

5、m-fetchAll(); $this-render(); function addAction() $this-view-title = Add New Albums; if(strtolower($_SERVERREQUEST_METHOD) = post) Zend_Loader:loadClass(Zend_Filter_StripTags); $filter = new Zend_Filter_StripTags(); $artist = $filter-filter($this-_request-getPost(artist); $artist = trim($artist); $

6、title = $filter-filter($this-_request-getPost(title); $title = trim($title); if($artist != & $title != ) $data = array( artist = $artist, title = $title, ); $album = new Album(); $album-insert($data); $this-_redirect(./); return; $this-view-album = new stdClass(); $this-view-album-id = null; $this-v

7、iew-album-artist = ; $this-view-album-title = ; $this-view-action = add; $this-view-buttonText = Add; $this-render(); function editAction() $this-view-title = Edit new Album; $album = new Album(); if(strtolower($_SERVERREQUEST_METHOD) = post) Zend_Loader:loadClass(Zend_Filter_StripTags); $filter = n

8、ew Zend_Filter_StripTags(); $id = (int)$this-_request-getPost(id); $artist = $filter-filter($this-_request-getPost(artist); $artist = trim($artist); $title = $filter-filter($this-_request-getPost(title); $title = trim($title); if($id != false) $data = array( artist = $artist, title = $title, ); $whe

9、re = id = .$id; $album-update($data,$where); $this-_redirect(./); return; else $this-view-album = $album-fetchRow(id=.$id); else $id = (int)$this-_request-getParam(id,0); if($id 0) $this-view-album = $album-fetchRow(id=.$id); $this-view-action = edit; $this-view-buttonText = Update; $this-render();

10、function deleteAction() $this-view-title = Delete New Album; $album = new Album(); if(strtolower($_SERVERREQUEST_METHOD) = post) Zend_Loader:loadClass(Zend_Filter_Alpha); $filter = new Zend_Filter_Alpha(); $id = (int)$this-_request-getPost(id); $del = $filter-filter($this-_request-getPost(del); if($

11、del = Yes & $id 0) $where = id = .$id; $rows_affected = $album-delete($where); else $id = (int)$this-_request-getParam(id); if($id 0) $this-view-album = $album-fetchRow(id = .$id); if($this-view-album-id 0) $this-render(); return; $this-_redirect(./); ?_index.phtmlescape($this-title);?a href=baseUrl

12、;?/index/addAdd new albun Title Artist   albums AS $album) :? escape($album-title);? escape($album-artist);? a href=baseUrl;?/index/edit/id/id;?Edit a href=baseUrl;?/index/delete/id/id;?Delete _header.phtml escape($this-title);? link rel=stylesheet type=text/css href=baseUrl;?/public/styles/sit

13、e.css / _footer.phtml edit.phtmlescape($this-title);?delete.phtmlescape($this-title);?album):?form action=baseUrl ?/index/delete method=post Arre you sure that you want to delete escape($this-album-title);? By escape($this-album-artist);? ? input type=hidden name=id value=escape($this-album-id);? /

14、Cannot find album.add.pthmlescape($this-title);?_form.phtmlform action=baseUrl;?/index/action;? method=post Artist input type=text name=artist value=escape($this-album-artist);?/ Title input type=text name=title value=escape($this-album-title);?/input type=hidden name=id value=escape($this-album-id)

15、;?/input type=submit name=add value=escape($this-buttonText);? /Album.phpMySQL- phpMyAdmin SQL Dump- version 3.3.10- - 主机: localhost- 生成日期: 2011 年 09 月 29 日 03:15- 服务器版本: 5.5.8- PHP 版本: 5.3.5SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;- 数据库: zend- - 表的结构 album-CREATE TABLE IF NOT EXISTS album ( id int(10) unsigned NOT NULL AUTO_INCREMENT, artist varchar(100) NOT NULL, title varchar(100) NOT NULL, PRIMARY KEY (id) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;- 转存表中的数据 album-INSERT INTO album (id, artist, title) VALUES(1, kylin, 你好13),(2, yeleng, 我想你),(5, SZH, ILY);

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1