Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Kohana i routing
skowron-line
post
Post #1





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

Ostrzeżenie: (0%)
-----


Zacząłem zabawe z Kohaną (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) i mam taki 1 problem mam
kontroller
  1. <?php defined('SYSPATH') OR die('No direct access allowed.');
  2.  
  3. class First_Controller extends Controller
  4. {
  5.            
  6.    public function index()
  7.    {
  8.        $config = Kohana::config_load('database');
  9.        $model = new News_Model();
  10.        $view = new View( 'first_view' );
  11.        $view->title = 'Elo elo';
  12.  
  13.  
  14.        $results = $model->getNews(2);
  15.        $view->results = $results;
  16.        
  17.        $view->render(true);
  18.    }
  19.    
  20.    public function add()
  21.    {
  22.        
  23.        $view = new View( 'first_view' );
  24.        $view->title = 'new';
  25.        
  26.    }
  27.    
  28. }
  29. ?>

kiedy jednak wpisze w przeglądarke adres
Kod
http://localhost/kohana/index.php/first/add/

To wyświetla mi 2 stronę dlaczego (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował skowron-line 2.05.2009, 23:44:46
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 17.09.2025 - 16:07