Wiki

Sorted by ratingX
Displaying 131-140 of 777 result(s).

How to log and debug variables using CWebLogRoute

Created 5 years ago by Antonio RamirezHow-tos8 comments – viewed 61,517 times – ( +18 ) – version 1.1
I have seen a couple of articles about how to integrate external libraries to debug our PHP code (i.e. firePHP) but after you read this article you will realize that there is no need for such libraries when using Yii.
tags: Logging

htmlOptions explained for various controls.

Created 5 years ago by WoilTips1 comment – viewed 53,174 times – ( +18 ) – version 1.1
Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

Using Yii with Nginx and PHP-FPM

Created 5 years ago by LericHow-tos10 comments – viewed 56,501 times – ( +18 ) – version 1.1
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.

Using International Dates

Created 5 years ago by Russell EnglandHow-tos4 comments – viewed 36,824 times – ( +18 ) – version 1.1
I needed British (dd/mm/yyyy) formatted dates throughout my application but found it very difficult to find examples of how to do this - until I found this excellent forum post http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/

Run Yiic directly from your app without a shell

Created 5 years ago by jacmoeHow-tos6 comments – viewed 32,099 times – ( +18 ) – version 1.1
Sometimes it would be nice if we could run yiic from an action, for example a migrate database button in our admin panel. Or because you are on a host which doesn't have shell access. Or maybe you are not allowed run popen or exec.

Relational Query - Lazy Loading and Eager Loading in Yii 1.1 / with and together

Created 3 years ago by softarkTutorials11 comments – viewed 34,842 times – ( +17 ) – version 1.1
It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's important to note that you should distinguish 2 different modes in the Eager Loading in Yii 1.1.x.

Manage application configuration in different modes

Created 7 years ago by qiangTutorials5 comments – viewed 36,673 times – ( +17 ) – version 1.1
Info: This tutorial references the idea presented in Jonah's excellent blog article.

Getting the Most out of APC for Yii

Created 4 years ago by Da:SourcererHow-tos10 comments – viewed 36,207 times – ( +17 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Using standard filters in CGridView custom fields

Created 5 years ago by GOshaHow-tos4 comments – viewed 60,628 times – ( +17 ) – version 1.1
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

CListView AJAX filtering

Created 5 years ago by DragaTutorials17 comments – viewed 61,153 times – ( +17 ) – version 1.1
This tutorial shows how to filter CListView items by AJAX, and it's compatible with disabled JavaScript users In my case this has been done to filter users list