DavidNorgren

Untitled

Nov 26th, 2014
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. // index.php
  2. <?php
  3.  
  4.     include "other/page.php";
  5.     include "other/stuff.php";
  6.    
  7.     page_begin();
  8.     page_head_begin();
  9.     page_title("My Title");
  10.     page_head_end();
  11.    
  12. ?>
  13.  
  14. blah
  15.  
  16. <?php
  17.     page_end();
  18. ?>
  19.  
  20. // page.php
  21. <?php
  22.  
  23.     function page_begin() {
  24.         echo "<!doctype html>\n<html>\n";
  25.     }
  26.    
  27.     function page_head_begin() {
  28.         echo "<head>\n";
  29.     }
  30.    
  31.     function page_title($title) {
  32.         echo "<title>$title</title>\n";
  33.     }
  34.    
  35.     function page_css($css) {
  36.         echo "<link rel='stylesheet' type='text/css' href='$css'/>\n";
  37.     }
  38.    
  39.     function page_js($js) {
  40.         echo "<script type='text/javascript' src='$js'></script>\n";
  41.     }
  42.    
  43.     function page_head_end() {
  44.         echo "</head>\n<body>\n";
  45.     }
  46.    
  47.     function page_end() {
  48.         echo "</body>\n</html>\n";
  49.     }
  50.  
  51. ?>
Advertisement
Add Comment
Please, Sign In to add comment