Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem z Smarty.
Forum PHP.pl > Forum > Po stronie przeglądarki
Ad4m1992
Witam. Postanowiłem pouczyć się technologii Smarty jednak już na początku, tak jak zawsze zresztą, wystąpił problem.
  1. <?php
  2. Fatal error: Smarty error: unable to write to $compile_dir '/home/ad4m/public_html/projekt/templates_c'. Be sure $compile_dir is writable by the web server user. in /home/ad4m/public_html/projekt/smarty/Smarty.class.php on line 1092
  3. ?>



Szukałem na wielu forach jednak nic mi nie pomogło zbytnio.
Drzewo moich katalogów przedstawia się pokrótce tak:
projekt:
cache;

configs;

templates:
index.tpl;

templates_c;

smarty:
[cała zawartość smarty, Smarty.class.php itp];

index.php;

smarty.inc.php;

Smarty.inc.php wygląda następująco:
  1. <?php
  2. require('smarty/Smarty.class.php');
  3.  
  4. $smarty = new Smarty;
  5.  
  6. $smarty->template_dir ='templates/';
  7. $smarty->compile_dir ='templates_c/';
  8. $smarty->config_dir = 'configs/';
  9. $smarty->cache_dir = 'cache/';
  10.  
  11. ?>


Index.php:
  1. <?php
  2.  
  3. // put full path to Smarty.class.php
  4. require_once('smarty.inc.php');
  5. $smarty = new Smarty();
  6.  
  7. $smarty->assign('name', 'Ned');
  8. $smarty->display('index.tpl');
  9.  
  10. ?>


I nie wiem dlaczego pojawia się taki błąd. Próbowałem zmieniać już ścieżki na wszelakie sposoby stosując '../' "./" itp.
Templates_c zmieniłem na chmod775 i cache tak samo. Posiadam linuxa Debian Etch
baranek77
po errorze wydaje się ,że chmod 777 template_c powinno pomóc
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.