/**
* 自定义打印函数
*/
function p ($arr) {
echo "<pre>";
print_r($arr);
echo "</pre>";
}
/**
* 成功跳转函数
*/
function success ($url, $msg) {
header('Content-Type:text/html;charset=utf-8');
$url = site_url($url); //ci框架
echo "<script type='text/javascript'>alert('$msg');location.href='$url'</script>";
die;
}
/**
* 失败返回函数
*/
function error ($msg) {
header('Content-Type:text/html;charset=utf-8');
echo "<script type='text/javascript'>alert('$msg');window.history.back();</script>";
die;
}
* 自定义打印函数
*/
function p ($arr) {
echo "<pre>";
print_r($arr);
echo "</pre>";
}
/**
* 成功跳转函数
*/
function success ($url, $msg) {
header('Content-Type:text/html;charset=utf-8');
$url = site_url($url); //ci框架
echo "<script type='text/javascript'>alert('$msg');location.href='$url'</script>";
die;
}
/**
* 失败返回函数
*/
function error ($msg) {
header('Content-Type:text/html;charset=utf-8');
echo "<script type='text/javascript'>alert('$msg');window.history.back();</script>";
die;
}