php如何打开网址

来源:百度知道 编辑:UC知道 时间:2024/06/25 01:43:16
php如何打开网址的方法,全面些的。
自动打开特定的网址 除了header(),还有别的方法吗?

1,header("location:http://www.baidu.com")直接提交
2,<body onload=加载一个函数处理的跳转> event事件跳转
3,<form action="index.php" method=post> 表单提交跳转
4,window.location="http://www.baidu.com"

真正属于PHP的就一个header()方法,别无二家。
但一个还不够你用吗?

header("Location: http://www.hao123.com/");
-------------------------------
另外一种方法
echo "<script>location.href='http://hao123.com'</script>";

$handle = fopen($url, "r");

header(Location:http://www.baidu.com);
试试