Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> smarty - pod win how ?
Method
post
Post #1





Grupa: Zarejestrowani
Postów: 177
Pomógł: 6
Dołączył: 14.01.2003
Skąd: Warszawa

Ostrzeżenie: (10%)
X----


hej ostatnio spotkalem cos co sie smarty zwie. troche poczytalem stwierdzilem zajebiste trzeba by bylo zainstalowac i sie pobawic. niestety nie wiem gdzie mam znalezc opis instalacji smarty pod windows'em.
Jesli ktos instalowal i udalo mu sie uruchomic pod winda bylbym wdzieczny gdyby okazal sie pomoc!
z gory dzieki za pomoc !


meth
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
kubatron
post
Post #2





Grupa: Zarejestrowani
Postów: 581
Pomógł: 0
Dołączył: 21.07.2003
Skąd: Jasło

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


To może podam przykład wywołania smartego:
index.php
[php:1:d0123b2128]<?php
require_once( 'start.inc.php' );
$smarty->assign( 'test' ,'To jest przykłądowy tekxt' );
$smarty->display( 'test.tpl' );
?>[/php:1:d0123b2128]
start.inc.php
[php:1:d0123b2128]<?php
require_once 'config/config.inc.php';





require_once 'lib/smarty/Smarty.class.php';
require_once 'lib/smarty/SmartyE.class.php';

$smarty = new SmartyE;


$smarty->compile_check = $smarty_compile_check;
$smarty->debugging = $smarty_debugging ;
$smarty->force_compile = $smarty_force_compile;
$smarty->caching = $smarty_caching;

$smarty->cache_dir = $tmp_folders . '/cache';
$smarty->compile_dir = $tmp_folders . '/templates_c';

$smarty->template_dir = $smarty_template_dir;
$smarty->config_dir = $smarty_template_dir. '/configs';


##############################################

require_once 'lib/adodb/adodb.inc.php';

$GLOBALS['DB'] =& ADONewConnection($dbtyp);
$DB->debug = $dbdebug;

$DB->SetFetchMode(ADODB_FETCH_ASSOC);


$conect = $DB->Connect($dbhost,$dbuser,$dbhaslo,$dbname) ;

if ($conect===FALSE)
{
die("Bł&plusmn;d startu. Brak połaczenia z baz&plusmn; danych");
}

##############################################
?>[/php:1:d0123b2128]
w katalogu lib dajesz sobie smartego i adodba
:wink:
Jakby co to dajcie znaka
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: 4.10.2025 - 19:07