Rob*_*cks 2 php url redirect location
我包含一个更改URL的PHP脚本.
// index.php
ob_start();
include "script.php";
// This script redirects using header("Location:");
$out = ob_get_clean();
// I use the $out data for calculations
echo $out;
Run Code Online (Sandbox Code Playgroud)
有没有一种简单的方法来反击或撤消这种不需要的重定向?怎么样:
header("Location: index.php"); // redirect back to self
Run Code Online (Sandbox Code Playgroud)
但这导致无休止的重定向循环...任何想法?
或者有没有办法从$ out缓冲区中去掉header()调用,防止它到达客户端?
| 归档时间: |
|
| 查看次数: |
342 次 |
| 最近记录: |