I am stuck in the problem,want to change default url from site/index to mycontroller/myaction…although it seems very simple but unable to do that please help me asap…and also i have tried extending Cwebuser
<?php
class WebUser extends CWebUser
{
public function test()
{
echo $test='dddd';
$this->redirect('admin/index');
return $test;
}
}
?>
You can say that a dummy function so that i would call this function in index.php(placed at root) it is doing nothinngggggggggg…as I am not very familiar about extending the core classes…Is my approach wrong
Read the guide from the beginning and look at the demo applications shipped with the framework.
Then you should also browse the class documentation. I would suggest to start at the CWebApplication class (there you will find defaultController as a property) which is the "main" entry point of the framework which handles requests, components,…
Every time you need to know e.g. available properties/methods of a class first search within the class documentation. For code use cases search the guide and the forum (use extended search in the forum cause the normal search not always gives the correct results. Could be that it is already fixed now…).
An other good method to become familar with the framework is to read the forum (questions area) like I did . At the beginning you will not understand a lot of things but after a while you become quite familar with the whole framework.