美好的一天stackoverflow。感谢您的时间。在php重定向中使用target =“_ blank”。我把它放在哪里?
我有这个PHP
$ImageLinks['image.png'] = 'http://www.example.com/r/redirect.php';
其重定向到 'redirect.php' - 这是下面
<?php $URL="http://thetargetlinktobeopenedinnewtab.com";
header ("Location: $URL");
exit();
?>
我怎样才能让这个$ URL在新标签中打开?我已经试过将target放置在所有地方。
你不能在重定向中这样做,它必须在页面的原始链接中完成。 – Barmar
[新选项卡中的标题位置]的可能重复(https://stackoverflow.com/questions/12539011/header-location-in-new-tab) –