Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> SMARTY instalacja
nyumon
post
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 5.04.2006

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


Witam Wszystkich

Mam pyt jak zainstalować SMARTY na serwerze hostingowym?? Help ME Please
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
phpcoder
post
Post #2





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 3.03.2006

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


http://smarty.php.net/quick_start.php

$> cd /web/www.domain.com
$> mkdir smarty
$> mkdir smarty/templates
$> mkdir smarty/templates_c
$> mkdir smarty/cache
$> mkdir smarty/configs
$> chown nobody:nobody smarty/templates_c
$> chown nobody:nobody smarty/cache
$> chmod 775 smarty/templates_c
$> chmod 775 smarty/cache

  1. <?php
  2.  
  3. // put full path to Smarty.class.php
  4. require('/usr/local/lib/php/Smarty/Smarty.class.php');
  5. $smarty = new Smarty();
  6.  
  7. $smarty->template_dir = '/web/www.domain.com/smarty/templates';
  8. $smarty->compile_dir = '/web/www.domain.com/smarty/templates_c';
  9. $smarty->cache_dir = '/web/www.domain.com/smarty/cache';
  10. $smarty->config_dir = '/web/www.domain.com/smarty/configs';
  11.  
  12. $smarty->assign('name', 'Ned');
  13. $smarty->display('index.tpl');
  14.  
  15. ?>


  1. <title>Smarty</title>
  2. </head>
  3. Hello, {$name}!
  4. </body>
  5. </html>


Ten post edytował phpcoder 5.04.2006, 10:49:54
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: 13.10.2025 - 22:02