Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Smarty] Ładowanie modułów
GameMaker
post
Post #1





Grupa: Zarejestrowani
Postów: 149
Pomógł: 2
Dołączył: 31.01.2010
Skąd: Konstancin-Jeziorna

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


Witam !

Dzisiaj zacząłem pracować ze smarty i chciałbym się dowiedzieć jak ładować moduły , pod zmienna {$content} , były ładowane pliki php oraz ich szablony :

  1.  
  2.  
  3. @error_reporting ( E_ALL ^ E_WARNING ^ E_NOTICE );
  4. @ini_set ( 'display_errors', true );
  5. @ini_set ( 'html_errors', false );
  6. @ini_set ( 'error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE );
  7.  
  8.  
  9. include('data/config.php');
  10. $smarty->debugging = true;
  11. $smarty->caching = true;
  12. $smarty->cache_lifetime = 10;
  13.  
  14. switch($_GET['do'])
  15. {
  16. case "music";
  17. include ("music.php");
  18. break;
  19. default:
  20. $tpl = $smarty->display("main.tpl");
  21. break;
  22. }
  23. $smarty->assign('theme','templates');
  24. $smarty->assign('login',$smarty->display('login.tpl'));
  25. $smarty->assign('content',$tpl);
  26. $smarty->display('index.tpl');


  1. index.tpl
  2. {$login}
  3. <br />
  4. {$content}
  5. </body>
  6.  
  7. </html>
  8.  
  9.  
  10.  


Ten post edytował GameMaker 4.08.2011, 19:58:21
Go to the top of the page
+Quote Post

Posty w temacie
- GameMaker   [Smarty] Ładowanie modułów   4.08.2011, 19:32:43
- - dstp   w tpl daj: {include file="$modul.tpl...   4.08.2011, 19:59:45


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: 22.08.2025 - 19:58