当前位置:首页 > 开发教程 > IT博文 > PHP技术 >

非常实用的php弹出错误警告函数

时间:2014-05-08 08:40 来源:互联网 作者:源码搜藏 收藏

php弹出错误警告函数 //********弹出alert框并跳转到指定页面******//function alert($message,$url=,$isAlert=true,$title=提示){echo htmlheadmeta http-equiv=Content-Type content=text/html; charset=utf-8 /title,$title,/title/headbody;echo script
php弹出错误警告函数
//********弹出alert框并跳转到指定页面******//
function alert($message,$url='',$isAlert=true,$title='提示'){
	echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>',$title,'</title></head><body>';
	echo '<script type="text/javascript">';
	echo $isAlert'alert("'.$message.'");':'';
	echo $url=='''history.back();':'location.href="'.$url.'";';
	echo '</script>';
	echo '</body></html>';
	exit();
}

PHP技术阅读排行

最新文章