Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created May 6, 2016 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurozumi/90c9ec3f60c66a35173bf677bdc39bfc to your computer and use it in GitHub Desktop.
Save kurozumi/90c9ec3f60c66a35173bf677bdc39bfc to your computer and use it in GitHub Desktop.
【CodeIgniter3】コントローラー毎にエラーページを切り替える
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Hooks
{
public function set_error_views_path()
{
$CI =&get_instance();
if(file_exists($dir_path = VIEWPATH . 'errors/' . strtolower(get_class($CI)) . '/'))
$CI->config->set_item('error_views_path', $dir_path);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment