Yii custom verification rules

Yii custom verification rules simple method: define rules within the model The simplest way to define a verification rule is to define it within the model that uses it. For example, you need to check whether your password is safe enough. In general,

YII tutorial-the first thing to do is to initialize a Model with a scenario. we have two methods to implement it.

The first thing to do is to initialize a Model with a scenario. we have two methods to implement it. The first thing to do is to initialize a Model with a scenario. we have two methods to implement it.1. the new CActiveRecord uses the constructor's

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, XSS security mode content

We need to use the htmlpurifier class in an action, which can enhance any model and indicate the attributes we want to make them XSS secure. We need to use the htmlpurifier class in an action, which can enhance any model and indicate the attributes

Yii multifile Upload

Yii multi-file Upload processing in the controller do you need to call the myFileHandler method that only has file upload fields? 12345678910 PublicfunctionactionIndex (){................ $ model = $ this-> myFileHandler ($ model, array (

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 uses nginx configuration

Yii uses nginx configuration Upstream phpfpm {# server unix:/var/run/php5-fpm.sock; server 127.0.0.1: 9000;} server {listen 80; # Specify this vhost's domain nameserver_name lxy. me; root/home/lxy. me/public; index. php index.html index.htm;

YiiMemCache application instance

Okay, data processing is complete. now we only need to call the relevant data in views/main. php. The keyword is used as an example. 1. create a table structure ? 123456 Create table if not exists 'config' ('name' varchar (128) not null,

YiiCGridView custom bottons method

YiiCGridView custom bottons method Sample code? 12345678910111213 Array ('class' => 'cbuttoncolumn', 'template' => '{email} {view} {update} {delete }', 'buttons' => array ('email '=> array ('label' => 'email', 'imageurl' => Yii: app () ->

Yii searches and sorts by association model in the GridView

Yii searches and sorts data using correlated models in the GridView. First, we have two models that are directly associated with each other. ? 123456789101112131415 ClassAuthorextendsCActiveRecord {...} classPostextendsCActiveRecord {...

YiiAJAXCTreeView enables dynamic loading of infinite level trees

YiiAJAXCTreeView enables dynamic loading of infinite level trees -- TABLE structure 'coverage' -- create table if not exists 'coverage' ('id' int (10) unsigned not null AUTO_INCREMENT, 'pid 'int (10) unsigned default null, 'coveragename' varchar (100

Yii-how to use CWebLogRoute to record and debug variables

I have read several times about using external libraries to Debug PHP code (for example, firePHP). after reading this article, you will find that these external libraries are not necessary in Yii. I have read several times about using external

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,

Processing recursive deletion in yii

As the developer of MutableLabs, I got a task: find a method for recursive deletion in yii. When I ask other developers to look around the Internet, the answer is usually plug-ins or cascading deletion at the database level, but I don't want to do

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,

Gii automatic code generation

Gii is implemented in a modular manner and must be used in an existing Yii application. To use Gii, first change the application configuration as follows 1. use Gii Gii is implemented in a modular manner and must be used in an existing Yii

Yii-YiiPHP framework 1.1.11 released

We are very pleased to announce the release of Yii Framework 1.1.11. In this version, we have included more than 100 improvements and bug fixes. We are very pleased to announce the release of Yii Framework 1.1.11. In this version, we have included

Yii-loading the rendering view using ajax in Fancybox

Sometimes we need to render a view in Fancybox. Sometimes we need to render a view in Fancybox. This technical guide describes how to implement it.Step 1: Prepare the View File widget('application.modules.admin.extensions.fancybox.EFancyBox',

Yii-CMenu menu controlled by the database

This is a simple database-based menu system that uses CMenu rendering. This is a simple database-based menu system that uses CMenu rendering.Database structure CREATE TABLE IF NOT EXISTS `menu` ( `menu_id` int(11) NOT NULL auto_increment, `name`

Yii-Confirm password field in the model

When I add or modify user records, I encountered some trouble in handling and confirming the password. I would like to share with you how I handled it. When I add or modify user records, I encountered some trouble in handling and confirming the

Total Pages: 12780 1 .... 12771 12772 12773 12774 12775 .... 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.