elePHPant

index.php smarty гостевая книга

Nov 8th, 2021 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2. require_once ('../smarty/libs/Smarty.class.php');
  3. require_once ('../cls/GuestBook.class.php');
  4. require_once ('../conn.php');
  5. $smarty = new Smarty;
  6. $smarty->template_dir = '/web/templates/';
  7. $smarty->compile_dir = '/web/templates_c/';
  8. $smarty->config_dir = '/web/configs/';
  9. $smarty->cache_dir = '/web/cache/';
  10.  
  11. $row = $conn->query("SELECT * FROM `gb`");
  12. while ($rw = $row->fetch()) {
  13.     $smarty->assign('title', 'Main Page', 'rw', $rw);
  14. }
  15. $smarty->display('templates/index.tpl');
Add Comment
Please, Sign In to add comment