04-29-2015, 07:22 PM
(This post was last modified: 04-29-2015, 07:27 PM by John_Betong.
Edit Reason: spelling: not my fortay
)
Try adding the following in your own ./config/config_personal.php
and I also have a common MY_Library:
This has worked for many old CI_VERSIONS without any problems.
PHP Code:
<?php # config_personal.php
defined ?: define('LOCALHOST, 'localhost'=== $_SERVER['SERVER_NAME']);
if( LOCALHOST):
define('GOOGLE_ON', FALSE);
$_SESSION['jjj'] = array
(
'angular' => FALSE,
'error_reporting' => -1, #-1==LOCAL
'display_errors' => 1, # 1==LOCAL
'threshold' => 1, # 1..4 agressive
'compress_result' => FALSE, #
'profiler' => TRUE, # DOES NOT ACCEPT 0 AS FALSE ?????
'MD5' => 1, # 1 == show cached filename
'cache_minutes' => 0, # minutes
'cache_path' => CACHEPATH,# define('CACHEPATH', APPPATH .'cache/current/');
);
else: # Must be ONLINE
define('GOOGLE_ON', FALSE);
$_SESSION['jjj'] = array
(
'angular' => FALSE,
'error_reporting' => -1,
'display_errors' => FALSE, # FALSE ONLINE
'threshold' => 1, # 1 ONLINE - 1..4 agressive
'compress_result' => FALSE, # [email protected]@dy DISQUS DOES NOT WORK if COMPRESSED
'profiler' => FALSE, # DOES NOT ACCEPT 0 AS FALSE ?????
'cache_minutes' => 0, # 1,440 = minutes per day
'cache_path' => CACHEPATH, # define('CACHEPATH', APPPATH .'cache/current/');
);
endif;
ini_set('error_log', APPPATH .'php_error.php');
error_reporting( $_SESSION['jjj']['error_reporting'] );
ini_set('display_errors', $_SESSION['jjj']['display_errors'] );
PHP Code:
//==================================================
class MY_Library extends CI_Controller
{
function j_view(& $data=array(), $getLatestAndThumbs=TRUE)
{
$this->output->enable_profiler( $_SESSION['jjj']['profiler'] );
// lots of other stuff
$this->load->view( $data['page_new'], $data, FALSE); # FALSE == ON SCREEN display
}//endfunc
}/// endclass