Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created May 6, 2016
Embed
What would you like to do?
【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