Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Kohana]dlaczego nie działa przykład z tutoriala
elita4all
post
Post #1





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 28.10.2009

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


Kod
<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Website extends Controller_Template {

    public function __construct(Request $req)
    {
        parent::__construct($req);

        $this->template->links = array
        (
            'Home' => 'home',
            'About' => 'about',
            'Products' => 'products',
            'Contact' => 'contact',
        );
    }

}

ten kod wywala taki błąd:
ErrorException [ Warning ]: Attempt to assign property of non-object
w linijce
Kod
$this->template->links = array



a jak wstawię ten kod do funkcji before to działa
Kod
  public function before()
    {

parent::before();


Ten post edytował elita4all 19.11.2010, 14:47:48
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: 23.08.2025 - 20:58