This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.
A common source of confusion among new Yii users is how the 'safe'
validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.
Sometimes new Yii guys face problem to manage dependent dropDownList using AJAX. I am going to discuss an easy solution about this issue.
We all love the convenient gadget, namely jQuery UI Datepicker as an input element for date. Yii supports it as CJuiDatePicker. Let's see how to use it.
The config first required In CApplication constructor
The popular [CListView] and [CGridView] widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data
variable to represent the current model object or array.
To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.
Assuming that you have already install the wampserver on your windows.
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing direc...
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language.
This tutorial shows a Yii-way of doing this.
We implement an event handler for the onBeginRequest event; as the nam...
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.
In addition to the opcode cache, APC can also serve as a user cache for Yii via [CApcCache]. It should be noted that this will make APC's memory needs less predictable.
This example uses a MySQL DB with a table named tree
with the fields id
, name
, and parent_id
. The parent_id
will be NULL
for root elements. The SQL is kept simple (no autoinc, no FK, etc).
This article describes an implementation of multi-tenancy using Yii and MySQL.
There are cases you want to update a record on CGridview directly
Simple as that. I have placed this action in my extension folder like:
[CMenu] offers great functionality and the ability to customize just about every aspect of the output. There are many times when I need to create a drop down menu or simply modify the look to make the designers happy. Because this seems to be a common task for me, I figured I would share my code to create a very simple drop down menu that other people could use.
Step1: Download the extension from path 'http://code.google.com/p/yii-mail/downloads/list' .
There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here: