阅读:164回复:2
PHP重点定向代码<?php // 检查URL参数'code'是否存在并且以'6'开头 if (isset($_GET['code']) && strpos($_GET['code'], '6') === 0) { // 执行重定向 header('Location: http://www.malhj.com/newpage.php'); exit; // 确保后续代码不会被执行 } ?> |
|
|
沙发#
发布于:2025-05-18 01:49
<?php if (isset($_GET['code']) && strpos($_GET['code'], '6') === 0) { echo '<html><head>'; echo '<meta http-equiv="refresh" content="0;url=http://www.malhj.com/newpage.php" />'; echo '</head></html>'; exit; // 确保后续PHP代码不会被执行 } ?> |
|
|
板凳#
发布于:2025-05-18 01:50
<?php
if (isset($_GET['code']) && $_GET['code'] == '6') { header('Location: /new-page.html'); exit; } ?> |
|
|