'modules' => array('pinups'),
'module_paths' => array(
APPPATH.'modules'.DS
)
class Controller_Home extends Controller {
public function action_index() {
echo __NAMESPACE__.'<br>';
$view = View::forge('home');
$view->myvar = 'test';
$loaded = Module::loaded();
print_r($loaded);
echo Pinups\Home::index();
return $view;
}
}
[pinups] => /srv/www/themoviepostersite.com/dev/fuel/app/modules/pinups/ Fatal error: Class 'Pinups\Home' not found in /srv/www/themoviepostersite.com/dev/fuel/app/classes/controller/home.php on line 17
namespace Pinups
class Controller_Home {
public function action_index() {
echo 'hello pinup';
}
}
Pinups\Home::index()
namespace Pinups
Class Controller_Pinups extends \Controller
{
public function action_index()
{
$str = 'hello pinup';
echo $str;
return $str;
}
}
ErrorException [ Error ]: Class 'Pinups\Home' not found APPPATH/classes/controller/home.php @ line 17
echo Pinups\Home::index();is generating the error. Any ideas of what I am doing wrong?
I have just updated a Module Pinup on two servers along with the source code: http://fuel.johns-jokes.com/John_Pinups http://test-002.anetizer.com/John_Pinups @Harro Verton I did notice that the Uri:class is showing incorrectly on Johns-Jokes.com Both applications use the same Fuel source but the App source is duplicated.Harro Verton wrote on Wednesday 4th of July 2012:The same applies to 'Pinups\Home', which should be '\Pinups\Home'. If you want to route to a module, by default the URI is "/module/controller/method/any_params".
Harro Verton wrote on Wednesday 4th of July 2012:You have a base configured? If not it will use the info from $_SERVER, I can't imagine code that would come up with a different hostname by itself...
It looks like you're new here. If you want to get involved, click one of these buttons!