chapter-2 helloworld

hi all

I am a newbie to Yii .try first example hello world by command in yiic shell:(As example, Chapter 2)

controller message helloWorld

but when Try it out by navigating to


I see The following error: :blink:

Fatal error: Using $this when not in object context in C:xampphtdocsyii_1frameworkdemoprotectedviewsmessageindex.php on line 2 

The content of the file index.php:





<h1><?php echo $this->id . '/' . $this->action->id; ?></h1>

<p>You may change the content of this page by modifying the file <tt><?php echo __FILE__; ?></tt>.</p>

Thanks so much for any help… :rolleyes:


I’m really newbie .my mistake is wrong navigating:

correct path is: