php中页面跳转部分方法论述

假设当前页面:http://localhost:80/index.php

1.include

echo “include t1.php”;

跳转后,url地址栏http://localhost:80/index.php既仍未当前的页面地址,既当前页面包括了t1.php页面。

如果再次点击提交按钮,数据库会重复插入相同数据,需要注意。

2.header函数

header("Location: http://localhost:82/zend-test/phptest/index.php");

跳转后,url地址为:Location: http://localhost:82/zend-test/phptest/index.php

地址变为你所要跳转的页面的地址,可以再次进行数据的插入。