Wiki

Sorted by ratingX
Displaying 141-150 of 786 result(s).

How to log and debug variables using CWebLogRoute

Created 7 years ago by Antonio RamirezHow-tos8 comments – viewed 66,859 times – ( +18 / -1 ) – 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 7 years ago by WoilTips1 comment – viewed 57,098 times – ( +18 / -1 ) – 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 6 years ago by LericHow-tos10 comments – viewed 64,153 times – ( +18 / -1 ) – 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 6 years ago by Russell EnglandHow-tos4 comments – viewed 39,708 times – ( +18 / -1 ) – 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 6 years ago by jacmoeHow-tos6 comments – viewed 37,157 times – ( +18 / -1 ) – 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.

Write & use a custom Component in Yii2.0

Created 3 years ago by sirin kHow-tos4 comments – viewed 79,079 times – ( +18 / -1 ) – version 2.0
This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

Implementing cron jobs with Yii

Created 7 years ago by samdarkHow-tos6 comments – viewed 86,619 times – ( +33 / -4 ) – version 1.1
There are two ways to run a cron job:
tags: cron, cli

Adding search to Yii blog example (using Zend Lucene)

Created 6 years ago by dckurushinTutorials21 comments – viewed 76,555 times – ( +33 / -4 ) – version 1.1
For this tutorial I will add a search to the blog demo. The search would be based on Zend Lucene.

How to translate and do the translations the easy way

Created 6 years ago by Roman SolomatinHow-tos3 comments – viewed 71,319 times – ( +28 / -3 ) – version 1.1
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.

Using search engine and user friendly URLs

Created 8 years ago by qiangTutorials7 comments – viewed 80,036 times – ( +23 / -2 ) – version 1.1
The Definitive Guide introduces the fundamentals of managing URLs in a Yii application. In this tutorial, we introduce a practical technique that can quickly turn your application into using search-engine-friendly URLs.
tags: SEO, URL