Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Usage Of Cwebapplication::createcontroller

$
0
0
        
public function actonTest()
{
	$controller = Yii::app()->createController('site/contact');
       	$controller->render('contact');
}

Error:
[size="1"]Fatal error: Call to a member function render() on a  non-object in  ...\protected\controllers\SiteController.php on  line [i]233[/i][/size]

createController() method:

Quote

Returns the controller instance and the action ID. Null if the controller class does not exist or the route is invalid.


What is wrong?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>