Hooks doesn't work in CodeIgniter 2.X |
I've enable hooks in config.php
$config['enable_hooks'] = TRUE; here is the hook.php <?php if ( ! defined('BASEPATH')) exit('No direct shagle voojio script access allowed'); /* | ------------------------------------------------------------------------- | Hooks | ------------------------------------------------------------------------- | This file lets you define "hooks" to extend CI without hacking the core | files. Please see the user guide for info: | | http://codeigniter.com/user_guide/general/hooks.html | */ $hook['post_controller_constructor'] = array( 'class' => 'Authorization', 'function' => 'authorize', 'filename' => 'authorization.php', 'file_path' => 'hooks' ); /* End of file hooks.php */ /* Location: ./application/config/hooks.php */ and here is the authorization.php file under application/hooks/ <?php class Authorization { private $ci; function __construct() { parent::__construct(); $this->ci = get_instance(); } function authorize() { echo 'This should be outputed'; } } ?> but it doesn't work. doesn't omegle anybody know why? |
Messages In This Thread |
Hooks doesn't work in CodeIgniter 2.X - by ReyesHatrinak - 10-27-2022, 03:55 AM
RE: Hooks doesn't work in CodeIgniter 2.X - by superior - 10-27-2022, 07:26 AM
|