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

localhost/yii_1/framework/demo/protected/views/message/index.php?r=message/%20helloWorld

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:




<?php

$this->breadcrumbs=array(

	'Message',

);?>

<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:

wow

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

correct path is: