Advertisement
darryljf

index.php commented

Mar 23rd, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. ini_set('display_errors', 1); // function script allows a script to temporarily override a setting in PHP congif file - display errprs set to on, represented by 1
  2. ini_set('display_startup_errors', 1); // set to true with 1 to display to override and display the errors
  3. error_reporting(E_ALL & ~E_NOTICE); // report all errors except E_NOTICE
  4.  
  5. require_once(__DIR__.'/includes/boot.include.php');
  6. echo $smarty->testInstall();
  7.  
  8. if($_GET['p']){ // check if a page is requested and assign smarty to display the requested view
  9.   $smarty->assign('view_name',$_GET['p']);
  10.   require_once('controllers/'.$_GET['p'].'.php');
  11.   $smarty->display('pages/'.$_GET['p'].'.tpl');
  12. }else{
  13.   $smarty->assign('view_name', 'login')
  14. }
  15.   /*
  16.  
  17.  
  18.  
  19. }else{ // else if no page is requested default to page view login
  20.  
  21.   require_once('controllers/login.php');
  22.   $smarty->display('pages/login.tpl');
  23. }
  24.  
  25.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement