Подключение шаблона


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. protected function Template($fileName,$vars=array())
  3. {
  4. foreach($vars as $k => $v)
  5. {
  6. $$k=$v;
  7. }
  8.  
  9. include $fileName;
  10. return ob_get_clean();
  11. }
  12.  
  13. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.