php - Updating new class Magic Minifier in CodeIgniter? -


lot of times have put new class in codeigniter, hepler, have problem, on server got error 500? dont know why.

this class want implement in ci

magic minifier

magicmin php based javascript , stylesheet minification , merging class.

http://www.phpclasses.org/browse/file/46461.html

i done , put in ci helper made construct, on view when try call object got error 500, , no error log in server?

can me that, have made work put class outside of ci, , done include, , working ok, dont want that, want have view, clean :)

when in controller

function __construct()     {         parent::__construct();            require( './application/third_party/class.magic-min.php' );         $vars = array(              'encode' => true,              'timer' => true,              'gzip' => true,              'closure' => true);         $data->minified = new minifier( $vars );      } 

it working dont want have require in construct?

$this->load->add_package_path()

adding package path instructs loader class prepend given path subsequent requests resources. example, "foo bar" application package above has library named foo_bar.php. in controller, you'd following:

$this->load->add_package_path(apppath.'third_party/foo_bar/'); $this->load->library('foo_bar'); 

http://ellislab.com/codeigniter/user-guide/libraries/loader.html


Comments

Popular posts from this blog

Change the color of an oval at click in Java AWT -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -