Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class MY_Controller extends CI_Controller{
- private $data = array();
- private $load_template = TRUE;
- private $template = array( 'template' => 'template' );
- public function __construct()
- {
- parent::__construct();
- }
- public function __destruct()
- {
- if( $this->load_template )
- {
- $this->data['template'] = $this->template;
- $this->load->view( $this->template['template'] );
- }
- }
- }
- Output
- 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
- 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
- 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
- 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
- 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
- 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