Yii's AR single-row automatic data caching mechanism

Yii's AR single-row automatic data caching mechanism   CActiveRecord CActiveRecordBehavior Cache Active Record Active Record (AR) is a popular object-relational ing (ORM) technology. Yii DAO can process almost any database-related tasks. However,

How does Yii ensure the uniqueness of a URL?

How does Yii ensure the uniqueness of a URL? For example, we have the following rules: 1 'Post/ '=> 'Post/read ', The following URLs are valid: 123 Post/read/id/5 post/read? Id = 5 post/5 If we

Yii simple user authorization system

First, create a new field (integer type) in the user table with the field name 'accesslevel'. it defines the user's access permission database. First, create a new field (integer type) in the user table, field name'AccessLevel', Which defines the

Low-level errors during Yii development

You are welcome to add the mistakes that are easy to make during Yii development. You are welcome to add the mistakes that are easy to make during Yii development.Forget echo In the following view output: Edit item: Label;?> You may spend a

Yii simple role-based access control

Yii simple role-based access control 12345678910111213141516171819 Publicfunctionfilters () {returnarray ('accesscontrol', // perform access control for CRUD operations);} publicfunctionaccessRules () {returnarray (array ('allow ',

YiiFramwork automatically records timestamps in ActiveRecord

There are many ways to automatically set the yii timestamp in the ActiveRecord model. The following two methods are described: There are many ways to automatically set the yii timestamp in the ActiveRecord model. The following two methods are

Yii authentication and authorization

Yii authentication and authorization Array ('index', 'view'), 'users' => array ('*'),), array ('allow ', // @ indicates the 'actions' => array ('create', 'update'), 'users' => array ('@'),), array ('allow', // allow admin user to

Yii verification code implementation

This article describes the implementation of the yii verification code, which is just a small example of the application by the Author. it is also available on the internet. to sum up, I hope to help Yii enthusiasts who need it. 1. I use user logon,

How to load the Yii-bootstrap extension in a specified action

How to load the Yii-bootstrap extension in a specified action I encountered a major problem when using Yii-Bootstrap extension, because the pre-loading mechanism made all AJAX requests initialize bootstrap. This is a great waste of resources,

Display friendly time formats in yii

Display friendly time formats in yii I recently encountered this problem when I was writing the yii Chinese encyclopedia program. I used to date ("Y-m-d H: I", $ time. However, many websites now display time as several minutes ago, several hours ago,

Yii-how to create a front-end and back-end login forms

In this Wiki, you can learn how to use a database to create a front-end and back-end login forms. In this Wiki, you can learn how to use a database to create a front-end and back-end login forms.Application scenarios After creating the default yii

Yii-simple role-based access control

If you need simple role-based access control instead of long RBAC processes, this article is perfect for you. Let's go straight to the topic. If you need simple role-based access control instead of long RBAC processes, this article is perfect for

Yii-search and sort by association model in the GridView

Search and sort by association model in the GridView Search and sort by association model in the GridView First, we have two models that are directly associated: class Author extends CActiveRecord { ... } class Post extends CActiveRecord { ...

Yii-simple user authorization system

By viewing the forum, I found this is a common problem, so I decided to write this article. How to create a simple (non-RBAC) user authorization system By viewing the forum, I found this is a common problem, so I decided to write this article. This

Yii-custom verification rules

In many cases, the validation rules provided by yii do not meet our requirements. all of them need to be defined to comply with our own rules. Custom validation rules In many cases, the validation rules provided by yii do not comply with our

Yii-understanding scenarios

The scenario is a very useful tool for separating all CModel derived class verification tasks. here we will use CActiveRecord. The scenario is a very useful tool for separating all CModel derived class verification tasks. here we will use

Cakephp: integration with Smarty

Set the attribute $ view to 'smarty 'in the controller, and indicate to the controller that I use Smarty as The View layer, instead of using the built-in cake I tried two methods:One is: http://projects.simpleteq.com/CakePHP/smarty.htmlAnother is:

Rewrite the template file in CakephpPlugin

Recently I encountered a problem where many plug-ins of cakephp come with built-in template files, such as plugin/Users/View/Users/login. ctp, I want to rewrite login. but this plug-in is a git submodule. after modification, submodule cannot be used

YII tutorial-how to use model to upload a file

First, declare an attribute in the model class to store the file name (either formmodel or activerecordmodel ). Similarly, a file verification rule is declared to ensure the specified extension of the uploaded file. First, declare an attribute in

Q: My yiic tool cannot run model and crud commands. why?

Different PHP installation environments may use different php. ini-CLIPHP (command line PHP parser ). Therefore, when running the model or crud command to use yiicshell, even if you confirm that you have enabled PDO and the corresponding database

Total Pages: 12780 1 .... 9238 9239 9240 9241 9242 .... 12780 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.