Cytat
Fatal error: Class 'Controller' not found in C:\wamp\www\scripts\Kohana\application\controllers\control.php on line 3
Ale jak już dam defined('SYSPATH') or die('No direct script access.'); tak jak w Kohanie jest przy powitaniu to się pojawia "No direct script access".
Plik Controllera control.php
<?php class Control_Controller extends Controller { function index() { // Load the view as an object $view = new View('show'); // Adding variables to the object that will be displayed in the view $view->title = "Welcome to Kohana !"; $view->heading = "My Heading"; $view->content = "My content here."; // Render the view $view->render(TRUE); } } ?>
Plik View show.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"> <head> </head> <body> <ul> </ul> </body> </html>