In this recipe, we will see how to configure Yii for best performances and will see some additional principles of building responsive applications. These principles are both general and Yii-related. Therefore, we will be able to apply some of these even without using Yii.
Install APC (http://www.php.net/manual/en/apc.installation.php).
Generate a fresh Yii application using
yiic webapp
.
Carry out the following steps:
First, we need to turn off the debug mode. This can be done by editing
index.php
as follows:defined('YII_DEBUG') or define('YII_DEBUG',false);
The next step is to use
yiilite.php
. Again, we need to editindex.php
and change the following code line:$yii=dirname(__FILE__).'/../framework/yii.php';
To the following code line:
$yii=dirname(__FILE__).'/../framework/yiilite.php';
Now we will move on to
protected/config/main.php
and make some changes:return array( // ... // application components 'components'=>array( // .....