Copy codeThe Code is as follows: <? Php
// ====================================== Define redirect () start = //
/**
* Defines the redirect () Jump function, which is used to jump to the specified page as required after user operations
*
* @ Param unknown_type $ ms is the number of seconds required for redirect.
* @ Param unknown_type $ url specifies the jump address
* @ Param unknown_type $ text: displays the jump information.
*/
Function redirect ($ ms = '', $ url ='', $ text = ''){
Echo <EOT
<Meta http-equiv = "refresh" content = $ ms; URL = $ url>
<Div align = "center">
<Table width = "600" border = "0" cellpadding = "1" cellspacing = "1" class = "tableoutline">
<Tr>
<Td colspan = "3"> <table width = "100%" border = "0" cellpadding = "5" cellspacing = "1">
<Tr>
<Td valign = "bottom"> <div align = "center"> webpage operation prompt </div> </td>
</Tr>
<Tr>
<Td> <div align = "center"> $ text </div> </td>
</Tr>
<Tr>
<Td> <div align = "center"> <a href = "$ url" mce_href = "$ url"> This page automatically jumps after $ ms seconds, if your browser does not jump, click this link to return. </A> </div>
</Td>
</Tr>
</Table> </td>
</Tr>
</Table>
</Div>
EOT;
}
// ====================================== Define redirect () end ====================================== //
?>
When used:
Redirect ('2', 'adduser. php', 'added users successfully! Return later! ');
2 indicates the number of seconds. adduser. php indicates the page to jump to. "The user has been added successfully! Return later! "Is the information displayed during the jump wait!