YII_DEBUG Tanımlaması

Entry Script dökümanında


To run in debug mode, define this constant as true before including the yii.php file.

şeklinde bir not var, YII_DEBUG 'un yii.php dosyasını çağırmadan önce tanımlanması gerektiğini söylüyor. Ancak yiic tarafından otomatik oluşturulan uygulamalarda YII_DEBUG yii.php çağırıldıktan sonra tanımlanıyor. Bu bir hata mıdır?

Örnek :

Entry Script dökümanında index’in şöyle olması gerektiği yazıyor :


// remove the following line when in production mode

defined('YII_DEBUG') or define('YII_DEBUG',true);

// include Yii bootstrap file

require_once('path/to/yii/framework/yii.php');

// create application instance and run

$configFile='path/to/config/file.php';

Ama index şu şekilde :


// change the following paths if necessary

$yii=dirname(__FILE__).'/../framework/yii.php';

$config=dirname(__FILE__).'/protected/config/main.php';


// remove the following lines when in production mode

defined('YII_DEBUG') or define('YII_DEBUG',true);

Teşekkürler.

Once yii yi ekleyip sonra debug modu u setup yaparsan calismiyor, Debug mod once girmek gerekiyor. sizin yolladiginiz ikinci kodlarda ise sadece tanimlama yapiliyor. yii eklemek icin debug define edildikten sonra


require_once($yii);

kullaniliyor