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 (1 - 3)
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
nyumon
post
Post #3





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

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


Zdawac by sie moglo ze OK, ale co w przypadku gdy niemam dostepu do usr/local/lib/php (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) w jakiej postaci wgrac to na ftp'a?
Go to the top of the page
+Quote Post
mike
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

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


W normalnej.

To jest zwykła klasa w php. Kopiujesz gdziekolwiek dodajesz do sktyptu require('ścieżka_do_smartyego/Smarty.class.php'); i działa.

Przenoszę na Gotowe skrypty php :: Systemy szablonów
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: 25.09.2025 - 19:57