Guest User

Untitled

a guest
Jan 23rd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. class MY_Controller extends CI_Controller{
  4.  
  5. private $data = array();
  6. private $load_template = TRUE;
  7. private $template = array( 'template' => 'template' );
  8.  
  9. public function __construct()
  10. {
  11. parent::__construct();
  12. }
  13.  
  14. public function __destruct()
  15. {
  16.  
  17. if( $this->load_template )
  18. {
  19. $this->data['template'] = $this->template;
  20. $this->load->view( $this->template['template'] );
  21. }
  22. }
  23.  
  24. }
  25.  
  26. Output
  27. Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or directory in /Users/johnathanb/Dropbox/htdocs/CodeIgniter-Template/system/core/Exceptions.php on line 167
  28.  
  29. Warning: include() [function.include]: Failed opening 'application/errors/error_php.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5.3/lib/php') in /Users/johnathanb/Dropbox/htdocs/CodeIgniter-Template/system/core/Exceptions.php on line 167
  30.  
  31. Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or directory in /Users/johnathanb/Dropbox/htdocs/CodeIgniter-Template/system/core/Exceptions.php on line 167
  32.  
  33. Warning: include() [function.include]: Failed opening 'application/errors/error_php.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5.3/lib/php') in /Users/johnathanb/Dropbox/htdocs/CodeIgniter-Template/system/core/Exceptions.php on line 167
  34.  
  35. Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or directory in /Users/johnathanb/Dropbox/htdocs/CodeIgniter-Template/system/core/Exceptions.php on line 167
  36.  
  37. Warning: include() [function.include]: Failed opening 'application/errors/error_php.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5.3/lib/php') in /Users/johnathanb/Dropbox/htdocs/CodeIgniter-Template/system/core/Exceptions.php on line 167
Add Comment
Please, Sign In to add comment