first specify what and where you have code for these .
for showing "Hello World" in your view file do the following ,
echo "Hello World"; // in your view file
and rander that page in controller function actionView() like ,
$this->render('view',array(
'model'=>$model,
));
public function actionShow()
{
// create a new instance of MessageForm model
$message=new MessageForm;
/*
* check to see if the MessageForm fields were filled in
*
* If they were, then print out the message and author
* with the show render - based on what the user inputted
*
* If not, then print out the default hellow world and
* default author with the show render.
*/
if(isset($message->message))
$this->render('show',array('message'=>$message));
else
{
$message->message = "Hello World";
$message->author = "Default Author";
$this->render('show',array('message'=>$message));
}
}
public function actionError()
{
if($error=Yii::app()->errorHandler->error)
{
if(Yii::app()->request->isAjaxRequest)
echo $error['message'];
else
$this->render('error', $error);
}
}
public function actionEdit()
{
// create a new instance of MessageForm model
$message=new MessageForm;
/*
* check to see if All the fileds are filled in on the form
* if so proceed to assign the values to the variables in the message model (author and message)
*
* If they validate (no errors) then render the show page with the new data values
*
* If there's errors, return to the edit form showing the errors
*
* Finally if the form wasn't set then we render the edit page so that the user can input field values.
*/
if(isset($_POST['MessageForm']))
{
$message->attributes=$_POST['MessageForm'];
if($message->validate())
$this->render('show',array('message'=>$message));
else
$this->render('edit', array('message'=>$message));
}
else
$this->render('edit', array('message'=>$message));
}
public function actionIndex()
{
$this->render('index');
}
public function actionSubmit()
{
$this->render('index');
}
}
On plank pages (WSOD) you’ll usually want to tap onto your web server’s error log file. On Apache, that would be probably error.log. Check your web server’s configuration for the location of this log file. On Linux, I usually do a [font=“Courier New”]tail -f[/font] on it to see errors as they occur.