Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Funny, but I Can't Load Even a Controller!
  • First of all... Fuel seems great! Just read the docs. ) Good job and I hope that development will be continued. =]
    And here I come with my funny problem. I don't know what I did wrong, but when I request "/fuel/foo"... empty page is loaded. ( I did fresh install of beta 1, "welcome" controller worked as expected! Hooray! )
    I changed DEBUG to true, deleted "welcome" controller and views.
    Created new controller and saved it in "app/classes/controller/foo.php"... http://www.sourcepod.com/hmfbjt52-4404 (the code is so simple that it's almost impossible to do something wrong xD)
    Created new view - "app/views/foo/index.php" - with simple HTML in it. Nothing wrong.
    And then, and I think that here I failed, I changed something about routes config. Here's array of routes:
    'routes' => array(
      // This is the default route.  We use a "#" here so that we do not have any
      // reserved routes.
      '#'  => 'foo',
      'foo' => 'foo'
     ),
    

    As much as I understood... "#" will execute when URI would look like "example.com/". And I set it to load controller "Foo". And above: if request is "foo" - load the same. And if default action is "index", then all should be ok, right? Where then I'm wrong? =D
  • Enable the log in the config and check your logfile for errors. Also check apache's logfile. Maybe that will tell you something...
  • Yeay! Thanks for reminding me of logging feature. =] The problem was that I forgot to prefix method with "action_"... =]

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion