Wiki

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

How to log and debug variables using CWebLogRoute

Created 6 years ago by Antonio RamirezHow-tos8 comments – viewed 64,677 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 6 years ago by WoilTips1 comment – viewed 55,403 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 60,630 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 38,445 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 5 years ago by jacmoeHow-tos6 comments – viewed 34,928 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 2 years ago by sirin kHow-tos5 comments – viewed 65,172 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)

How to hide /frontend/web in url addresses on apache

Created 2 years ago by raminiousHow-tos14 comments – viewed 81,073 times – ( +18 / -1 ) – version 2.0
There is an issue on Yii2 to redirecting / urls to /frontend/web. In other words we need a way to hidden /frontend/web from addresses. We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

Adding search to Yii blog example (using Zend Lucene)

Created 5 years ago by dckurushinTutorials21 comments – viewed 74,597 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 5 years ago by Roman SolomatinHow-tos3 comments – viewed 68,131 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 7 years ago by qiangTutorials7 comments – viewed 77,082 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