Summary of phalcon daily report submission platform

WBOY
Release: 2016-07-29 09:05:59
Original
938 people have browsed it

Summary: Through the development day report submission system, I have mastered the basic phalcon framework principles and PHP language. I also learned about some common Linux commands and gained a lot.
The following is a summary of the problems encountered in the project:
1. Three methods used to transfer front-end data to the back-end:
(1) Form submission form, $this->request-> ;getPost('name');
(2) Hyperlink, $_GET["name"];
(3) Hyperlink< ;a href="controller/action/parameters">, get the parameters parameters from the background function name ()

2. Two methods of data globalization:
(1) session $this-> ;session->set('auth',array(
'number' => $info->number,
'name' => $info->name,
'permission '=>$info->permission));
(2) persistent persistence, $this->persistent->acl = $acl

3. Plug-ins, used in this project The purpose of access control acl is to enter this securityplugin before routing jump and determine whether the current role is Have permission to enter this url. This part requires setting di in the service. During the coding process, a shortcoming of the framework was discovered, foreach ($guestResources as $resource => $actions) {
$acl->allow('guest', $resource, '*');The * here refers to all actions under the controller corresponding to the resource , instead of the previously defined action (which is inconsistent with the documentation), and its allow or deny cannot exceed a certain number.
4. To send emails, the PHPMailer library is used, and you need to add the class.phpmailer.php and class.smtp.php reference paths. For details, see page 88 of "The Essence of PHP Language" OREILLY

5. Establishing the project and model layers can be completed with the commands phalcon project ABC and phalcon model ABC, which is more convenient and practical.

The above introduces the summary of the phalcon daily report submission platform, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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!