Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Smarty] Odzielnie działa w kupie nie chce, unable to read resource
BugsBunny
post 24.05.2007, 17:23:44
Post #1





Grupa: Zarejestrowani
Postów: 206
Pomógł: 4
Dołączył: 2.04.2005

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


Mam taki kod

ustawienia.php
  1. <?php 
  2. define('APP_URL', 'http://MOJE IP/~homepage/');
  3. define('STYL_PATH', 'style/pierwszy/');
  4.  
  5. // baza danych
  6. define('DB_PREFIX', 'homepage_');
  7.  
  8. // Smarty
  9. $smarty->compile_check = true;
  10. $smarty->debugging = true;
  11.  
  12. $smarty->template_dir = STYL_PATH ; 
  13. $smarty->compile_dir = STYL_PATH . "Smartytemp/templates_c";
  14. $smarty->config_dir  = STYL_PATH . "Smartytemp/configs";
  15. $smarty->cache_dir = STYL_PATH . "Smartytemp/cache"; 
  16. ?>


index.php
  1. <?php 
  2. require_once 'klasy/class.db.php';
  3. require_once 'system/Smarty/Smarty.class.php';
  4.  
  5. $smarty = new Smarty;
  6. require_once 'system/ustawienia.php';
  7. $smarty->display('gora.tpl');
  8.  
  9.  
  10. if(isset($_GET['p']))
  11. {
  12. $p = intval($_GET['p']);
  13.  
  14. $db = new db();
  15.  
  16. $db->fetcharray("SELECT * FROM `".DB_PREFIX."strony` WHERE `kod`='".$p."' ");
  17. if($db->rekordy == TRUE)
  18. {
  19. if(file_exists($db->rekordy[0]['plik'].'.php'))
  20. {
  21.  
  22. include $db->rekordy[0]['plik'].'.php';
  23.  }
  24. }
  25.  } 
  26.  else
  27.  {
  28.  include 'news.php';
  29.  }  
  30. $smarty->display('dol.tpl');
  31.  
  32. ?>


a błędy takie

Warning: Smarty error: unable to read resource: "news.tpl" in c:\usr\krasnal\www\homepage\system\Smarty\Smarty.class.php on line 1095


Warning: Smarty error: unable to read resource: "news.tpl" in c:\usr\krasnal\www\homepage\system\Smarty\Smarty.class.php on line 1095

Jak w pierwszy display wpiszę dol.tpl albo news.tpl to się normalnie otwiera.

Ten post edytował BugsBunny 24.05.2007, 17:25:15
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.06.2025 - 04:44