Book Image

Yii Project Blueprints

By : Charles R. Portwood ll
Book Image

Yii Project Blueprints

By: Charles R. Portwood ll

Overview of this book

Table of Contents (15 chapters)
Yii Project Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Initializing the project


As we did in our tasks project, we begin the development by creating a few folders in our application web root:

nearby/
   assets/
   js/
   protected/
      commands/
      config/
      controllers/
      data/
      extensions/
      migrations/
      models/
      runtime/
      views/

In this application, we added two new folders, commands and extensions. The commands folder is a special folder in Yii that yiic will reference when running console commands. The extensions folder is a special folder in Yii, where Yii extensions or third-party classes can be placed.

Next, let's go ahead and add our Yii Bootstrap file, index.php, to the root of our application. We need to be sure to change the Yii path to the location on the system:

<?php

// change the following paths if necessary
$yii='/path/to/yii/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';

error_reporting(E_ALL);
ini_set('display_errors', '1');
// remove the following lines when...