php有没有像ASP里面的Response.redirect一样的页面转向函数 有的。header("location:b.php"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 范例一: 本例用来重导用户到 PHP 的官方网站。<?phpHeader("Location: http://www.php.net"); exit;?>范例二: 欲让用户每次都能得到最新的资料,而不是 Proxy 或 cache 中的资料,可以使用下列的标头header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");header("Cache-Control: no-cache, must-revalidate");header("Pragma: no-cache");范例三: 让用户的浏览器出现找不到文件的信息。<?phpheader("Status: 404 Not Found");?>范例四: [email protected] (28-Apr-1999) 提供让用户下载文件的范例。header("Content-type: application/x-gzip");header("Content-Disposition: attachment; filename=some-file.tar.gz");header("Content-Description: PHP3 Generated Data"); 可以用header前不能有输出.也可以用include包含一个文件.include('文件名'); echo "<META HTTP-EQUIV=REFRESH CONTENT='1;URL=index.php'>"; echo "<script language='javascript'> location.href='连接文件路径';alert('Loging Again ');</script>"; learning....................................... 有关简单mysql数据查询 连接mysql总是提示如下:Fatal error: Call to undefined function mysql_connect() php可以去除jpg格式图片的背景并加水印吗? 这种效果怎么实现的? 防盗链? PHP怎么给自定义函数赋值 关于PHP中session的问题,请大家帮忙!! PHP里面可以使用JavaScript吗 多用户系统的问题 我在http://www.lycos.co.uk申请的主页怎么用不起FTP? 请教 PHPMYADMIN 的下载地址 php能用sql server吗? 用过蓝狐文章管理系统的朋友请帮个忙。
<?php
Header("Location: http://www.php.net");
exit;
?>范例二: 欲让用户每次都能得到最新的资料,而不是 Proxy 或 cache 中的资料,可以使用下列的标头
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");范例三: 让用户的浏览器出现找不到文件的信息。
<?php
header("Status: 404 Not Found");
?>范例四: [email protected] (28-Apr-1999) 提供让用户下载文件的范例。
header("Content-type: application/x-gzip");
header("Content-Disposition: attachment; filename=some-file.tar.gz");
header("Content-Description: PHP3 Generated Data");