标签: php html
我想重定向链接,比如快捷方式网址
<?php $hosted_url=$_GET['url']; header( '$hosted_url' ) ; ?>
但是当我尝试这个http://example.com/test.php?url=http://google.com时 什么都没发生 如何使此代码工作并重定向链接
答案 0 :(得分:1)
您需要包含要发送的实际标头。根据{{3}}:
header("Location: ".$hosted_url);