CodeIgniter(3.1.4)框架中成功/错误跳转
if ( ! function_exists('error'))
{
/**
* 错误跳转
*/
function error($mes, $url)
{
echo '<script type="text/javascript">alert("'.html_escape($mes).'");history.back();</script>';
exit();
}
}
// ------------------------------------------------------------------------
if ( ! function_exists('success'))
{
/**
* 成功跳转
*/
function success($mes, $url)
{
echo '<script type="text/javascript">alert("'.html_escape($mes).'");window.location.href="'.$url.'";</script>';
exit();
}
}

浙公网安备 33010602011771号