adding new page raise can not find view page error

I want to add a new page to it, in siteController.php I add

	public function actionAgreement()





and in /protected/views/site/

I add a new file


the content is


$this->pageTitle=Yii::app()->name . ' - '. Yii::t('translation','Agreement');

$this->breadcrumbs[] = Yii::t('translation','Agreement');?>

<h1><?php echo Yii::t('translation','Agreement'); ?></h1>




but after run

end up getting this error



SiteController 无法找到请求的视图 "agreement".



00795: {

00796: if(($viewFile=$this->getViewFile($view))!==false)

00797: {

00798: $output=$this->renderFile($viewFile,$data,true);

00799: if($processOutput)

00800: $output=$this->processOutput($output);

00801: if($return)

00802: return $output;

00803: else

00804: echo $output;

00805: }

00806: else

00807: throw new CException(Yii::t(‘yii’,’{controller} cannot find the requested view “{view}”.’,

00808: array(’{controller}’=>get_class($this), ‘{view}’=>$view)));

00809: }

any idea?

If I change function actionAgreement content to


it can display the index page.

Why the file exists but raise this view page not found error?

if you are on a linux based system, be mindful of case sensitivity. If that’s not the issue, make sure you did not make a typing error.

thx,it’s case sensitive error

No problem.