How To Create A Yii Application Object

I want to use Yii functions in another open source projects (moodle, joomlma, …) So I can benefit Yii powerful models.

I put following code in one of the files (ROOT/course/edit.php):

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

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

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

defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);



But I get following error:

[size="3"]How I can Create A raw Yii Application Object?[/size]


Have you tried this

Unfortunately, this page didn’t help me.

I’m familiar about yii developement. I want to catch a yii::app() object in another application.

Hi wwwwww ! Try to include Yii core file yii.php to the your another project in this way:


And defined YII_PATH constant to your own scripts path.


  • try read this:

extension.integration 2.