Leri
Leri

Reputation: 12535

Strange (for me) behavior of YII framework

I use YII framework and I needed to echo out query that is generated with the method insert($attributes=null) in CActiveModel class which, as it's told in documentation, is in framework/db/ar/CActiveRecord.php.

Well, my task was not hard, so I opened this file and edited this method, but nothing happened. After a little head-ache I've found out that my application was importing this class from the folder where I downloaded YII first.

What could be the reason of this behavior? I've solved my problem by changing path but I wonder, is it good solution?

Thank you in advance.

Upvotes: 0

Views: 147

Answers (1)

Puigcerber
Puigcerber

Reputation: 10114

It's on index.php where you tell your application where to find the classes of the framework, so that's the line you should edit.

// change the following paths if necessary
$yii=dirname(__FILE__).'/../yii/framework/yii.php';

Upvotes: 0

Related Questions