首页 技术教程 实用代码 注册破解 正则表达式 网址导航 电子书籍

php的header和asp中的redirect比较

asp中实现重定向是用response.redirect 函数: 用法一例: response.redirect "../test.asp" php中也有类似函数:header 用法一例: header("location:../test.php"); 但是两者是有区别的. asp的redirect函数可以在向客户发送头文件后起作用. 如 <html><head></head><body> <%response.redirect "../test.asp"%> </body></html> 查是php中下例代码会报错: <html><head></head><body> <? header("location:../test.php"); ?> </body></html> 只能这样: <? header("location:../test.php"); ?> <htm...
类别:网页编程 - PHP技术    查看:113    更新:2014-05-05