Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem ze smarty, tpl i katalogi
Legro
post
Post #1





Grupa: Zarejestrowani
Postów: 233
Pomógł: 3
Dołączył: 18.07.2005

Ostrzeżenie: (40%)
XX---


mam glowny katalog mojego skryptu ktory nazywa sie main_script

w tym katalogu mam np. dwa foldery: templates oraz files i jeden plik index.php

jezeli chce zrobic szablon do index.php to tworze w folderze templates plik index.tpl

ale teraz mam problem, bo jak chce :

- w folderze files utworzyc plik files.php
- zrobie w folderze templates folder files i w nim plik files.tpl to to nie dziala

czyli jezeli moj plik php znajduje sie w folderze to ten plik tpl tez sie znajduje w takim samym folderze ktory ma taka sama nazwe..

rozumiecie?

wiec jak to zrobic?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Legro
post
Post #2





Grupa: Zarejestrowani
Postów: 233
Pomógł: 3
Dołączył: 18.07.2005

Ostrzeżenie: (40%)
XX---


OK. Dzieki za pomoc. Ale teraz wyskoczyl inny blad:

Cytat
Fatal error: Smarty error: the $compile_dir 'templates_c' does not exist, or is not a directory. in c:\usr\apache\httpd\html\main_script\smarty\Smarty.class.php on line 1095


A przeciez taki folder mam stworzony w glownym katalogu skryptu :/




EDIT (IMG:http://forum.php.pl/style_emoticons/default/snitch.gif) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

ok dodalem jeszcze
$smarty -> compile_dir = SMARTY_TEMPLATES_C;

i dziala (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) )(IMG:http://forum.php.pl/style_emoticons/default/smile.gif) :


tylko teraz mam problem znowu bo jak skrypt wgram na serwer to sciezka nie bedzie taka: c:\usr\apache\httpd\html\main_script\

tak wiec jak zrobic aby podac glowny katalog skryptu (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował Legro 11.05.2006, 19:56:04
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: 28.09.2025 - 22:10