Tuesday, July 3, 2012

learn YII a first Example

you will find a number of styles of text that distinguish between different kinds of
information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "We can include view partials through the use of the
include directive."
A block of code is set as follows:
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 0);
$yii=dirname(__FILE__).'/../framework/yii.php';
$config=dirname(__FILE__).'/../app/config/production.php';
require($yii);
Yii::createWebApplication($config)->run();

When we wish to draw your attention to a particular part of a code block, the relevant lines or
items are set in bold:
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 0);
$yii=dirname(__FILE__).'/../framework/yii.php';
$config=dirname(__FILE__).'/../app/config/production.php';
require($yii);
Yii::createWebApplication($config)->run();

No comments:

Post a Comment