phalcon干日报告提交平台总结

WBOY
Release: 2016-06-13 12:28:29
Original
781 people have browsed it

phalcon做日报告提交平台总结

总结:通过开发日报告提交系统,掌握了基本的phalcon框架原理和PHP语言。也了解了一些linux常用指令,收获颇丰。
下面对项目中所遇到的问题进行总结:
1.前台数据传往后台所用的三种方法:
(1)表单提交form,$this->request->getPost(‘name’);
(2)超链接, $_GET[“name”];
(3)超链接,从后台函数名中()中获取参数parameters

2.数据全局化的两种方法:
(1)session $this->session->set(‘auth’,array(
‘number’ => $info->number,
‘name’ => $info->name,
‘permission’=>$info->permission));
(2)persistent持久化, $this->persistent->acl = $acl

3.插件plugins,本项目中用到访问控制acl,目的是在路由跳转之前进入这个securityplugin中,判断目前的角色role是否有权限进入这个url。这部分需要在service中设置di。编码过程中发现了一个框架的不足之处, foreach ($guestResources as $resource => $actions) {
$acl->allow(‘guest’, $resource, ‘*’);这里的*指的是该resource对应的controller下所有的action,而不是之前定义的action(与文档讲解不符),而且它的allow或者deny不能超过一定数量。
4.发送邮件,用的是PHPMailer库,需要添加class.phpmailer.php 和class.smtp.php引用路径。详情见《PHP语言精粹》OREILLY 88页

5. 建立项目和model层可以用指令phalcon project ABC和phalcon model ABC完成,更加方便实用。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!