In the common.php of the core of system, 4 custom functions are used for reference,
CI Tutorial from the backing net
/** * Formatted print function * @param [type] $arr [array] * @return [type] [description]*/functionP$arr){ Echo' <pre> '; Print_r($arr); Echo' </pre> ';}//Admin/category/index/** * Successful prompt function * @param [type] $url [jump Address] * @param [type] $msg [message] * @return [type] [description]*/functionSuccess$url,$msg){ Header(' Content-type:text/html;charset=utf-8 '); $url= Site_url ($url); Echo"<script type= ' text/javascript ' >alert ('$msg'); location.href= '$url' </script> '; die;}/** * error message function * @param [type] $msg [hint] * @return [type] [description]*/functionError$msg){ Header(' Content-type:text/html;charset=utf-8 '); Echo"<script type= ' text/javascript ' >alert ('$msg'); Window.history.back ();</script> "; die;}/** * Print Constants*/functionPrint_const () {$const=get_defined_constants(TRUE); P ($const[' User ']); }
CI notes, 4 auxiliary custom functions for reference