Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [smarty] co robie zle
Dzik
post
Post #1





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 24.02.2007

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


Elo. Musze zincludowac smarty do innego katalogu, z ktorego bedzie wyswietlany 2 index, ale cos mi nie wychodzi. (Warning: Smarty error: unable to read resource: "index.tpl" in C:\Program Files\xampp\htdocs\CMS\smarty\libs\Smarty.class.php on line 1092)
  1. <?php
  2. require_once('../smarty/libs/Smarty.class.php');
  3. $smarty->template_dir = '../templates/admin/';
  4. $smarty->compile_dir = '../templates_c/';
  5. $smarty->config_dir  = '../configs/';
  6. $smarty->cache_dir = '../cache/';
  7.  
  8.  
  9. $smarty = new Smarty;
  10. $smarty->display('index.tpl');
  11. ?>


Normalnie wszystko trzymam w templates, ale dla admin robie osobny katalog. Co tu jest zle?

Ten post edytował Dzik 27.07.2008, 22:45:20
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




$smarty = new Smarty; - TO masz dac przed przypisywaniem wlasciwosci do obiektu $smarty...
Go to the top of the page
+Quote Post
JoShiMa
post
Post #3





Grupa: Zarejestrowani
Postów: 1 374
Pomógł: 149
Dołączył: 1.03.2006

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


Poza tym, żebyśmy zgadli co robisz źle, to powinieneś nam pokazać strukturę katalogów.
Go to the top of the page
+Quote Post
pikey
post
Post #4





Grupa: Zarejestrowani
Postów: 11
Pomógł: 0
Dołączył: 15.10.2006

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


może najpierw dobrze przeczytaj: http://www.webtips.pl/post5950.html
Go to the top of the page
+Quote Post

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 - 13:27