Frage

A similar question has been asked before but solution to that didn't help me. I created a file "dave.php" in application/classes/Controller/ folder and I renamed the controller as well. Here's the code in dave.php file:

<?php defined('SYSPATH') OR die('No Direct Script Access');

Class Controller_Dave extends Controller
{
public function action_index()
{
    echo 'hello, world!';
}
}

kohana/index.php/dave - but I am still geting that error. Any ideas why?

War es hilfreich?

Lösung

It seems that you use Kohana 3.3, so the file name should be Dave.php not dave.php

Andere Tipps

That is my htaccess

RewriteEngine On

RewriteBase /

RewriteRule ^(application|modules|system) - [F,L]

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php/$0 [PT,L]

Check, is apache mod_rewrite enable and loaded at phpinfo(); In My case I've just enable mod_rewrite at apache.

 sudo a2enmod rewrite 

and than restart

sudo systemctl restart apache2

Check .htaccess rules.

And note, that Controllers names are case sensitivity.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top