The very practical php pop up error warning function is very extensible
- 2020-12-19 20:56:15
- OfStack
Share a very practical, I 1 in the use of php pop-up warning function, organized into their own code base in the place of error can be used in this function, strong extensibility, complete code is as follows
//******** The pop-up alert Box and jumps to the specified page ******//
function alert($message,$url='',$isAlert=true,$title=' prompt '){
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();
}