0

I am using a mvc framework and I am stuck on a part.

In my frontcontroller, I have the following code:

class FrontController extends Controller {

    public function index() {
        $view_vars = array(
            'page_title' => 'Home',
            'page' => 'home'
        );

        $this->render("default_layout", $view_vars);
     }

     public function create(){
        $view_vars = array(
            'page_title' => 'Create Your Own MyChoice Package',
            'page' => 'home'
        );

        $this->render("default_layout", $view_vars);
     }

}

Futher to this I have a php file in my views folder as follows:

.....
<img class="imageCreate" src ="<?php print $theme_url; ?>images/create.jpg" />
<a href="create"><img class="BtnCreate" src="<?php print $theme_url; ?>images/vvv"/> </a>
<a href="predefined-package"> <img class="BtnChoose" src="<?php print $theme_url; ?>
......

The problem is I have created the function "create" in my controller but when triggering it, it is returning not found.

Even when I do

http://LOCATION/index

it returns not found.

Please help.

Thanks

3
  • Can we see your Router?
    – Ohgodwhy
    Jan 11, 2014 at 8:20
  • What Framework are you using? Looks like Yii?
    – luttkens
    Jan 11, 2014 at 8:24
  • Thanks all, I managed. The path need to be "?create". @luttkens It is not Yii but rather another one build by bits from online tutorials.
    – pris
    Jan 11, 2014 at 8:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.