Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP][SMARTY]stronicowanie
Forum PHP.pl > Forum > Przedszkole
Ruch Radzionków
witam mam taki problem z stronicowaniem otóż do normalnego skryptu używam takiego stronicowania:
  1. define('MAXPAGE', 10);
  2. $pok = mysql_query("SELECT COUNT(*) FROM news WHERE lang='$_SESSION[lang]' ORDER BY data DESC");
  3. list($max) = mysql_fetch_row($pok);
  4. $total = ceil($max / MAXPAGE);
  5. $page = intval(@$_GET["page"]);
  6. if(0 == $page)
  7. {
  8. $page = 1;
  9. }
  10. $start = MAXPAGE * ($page - 1);
  11. $full = MAXPAGE;
  12. echo '<table width="100%">';
  13. $obej = mysql_query("SELECT * FROM news WHERE lang='$_SESSION[lang]' ORDER BY data DESC limit $start, $full");
  14. while(list($id, $tytul, $tresc, $data, $jezyk, $iduser) = mysql_fetch_row($obej))
  15. {
  16. }

i teraz gdy chce zrobic to w smartach pokazuje mi taki błąd:
Kod
Warning: include(lang/pl/0.php) [function.include]: failed to open stream: No such file or directory in E:\webserv\httpd\events\index.php on line 24

Warning: include() [function.include]: Failed opening 'lang/pl/0.php' for inclusion (include_path='.;C:\php5\pear') in E:\webserv\httpd\events\index.php on line 24

Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'theme/events/0.html' in 'theme/events/index.html'' in E:\webserv\httpd\events\smarty\sysplugins\smarty_internal_templatebase.php:127 Stack trace: #0 E:\webserv\httpd\events\smarty\sysplugins\smarty_internal_template.php(286): Smarty_Internal_TemplateBase->fetch(NULL, NULL, NULL, NULL, false, false, true) #1 E:\webserv\httpd\events\templates_c\a28314e7ff3f1e0bca42f620c3a2ddd268ed89ee.file.index.html.php(134): Smarty_Internal_Template->getSubTemplate('theme/events/0....', NULL, NULL, NULL, NULL, Array, 0) #2 E:\webserv\httpd\events\smarty\sysplugins\smarty_internal_templatebase.php(180): content_50c10e26a8bb10_43838898(Object(Smarty_Internal_Template)) #3 E:\webserv\httpd\events\smarty\sysplugins\smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('theme/events/in...', NULL, NULL, NULL, true) #4 E:\webserv\httpd\events\index.php(34): Smarty_Internal_TemplateBase->display('theme/events/in...') #5 {main} thro in E:\webserv\httpd\events\smarty\sysplugins\smarty_internal_templatebase.php on line 127

co bym musiał zmienic w tym kodzie żeby działało prawidłowo. z góry dzięki za pomoc
nospor
Tyle czasu na forum, tyle postów i nadal nie wie, że jak ma błąd z kodem to należy ten kod pokazać.... ludzie kochani, co z Wami? Naprawdę we wróżki wierzycie?

ps: poza tym komunikat błędu masz dość jasne, czemu ich nie poprawisz?
Ruch Radzionków
sprawa rozwiazana
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.