当前位置:首页 > 行业动态 > 正文

php跳转php_PHP

在PHP中,跳转到另一个PHP页面通常使用header()函数实现,以下是一个简单的示例:

php跳转php_PHP  第1张

<?php
// 跳转到目标页面 target.php
header("Location: target.php");
exit;
?> 

在这个例子中,我们使用header()函数将用户重定向到名为target.php的页面。exit语句确保在发送头部信息后终止脚本的执行。

0