php动态中的重定向

php动态中的重定向,php,redirect,Php,Redirect,我无法重定向我的url 我有网址:- http://example.com/r/index.php?id=1234 它给出了数据库中url的值。我将url的值存储在$url\u链接中 在同一页上,在db操作之后,我在主体部分添加了重定向代码 <?php header('Location: http://$url_link'); ?> 它不接受$url\u链接的值。它应该是这样的 <?php header('Location: http://'

我无法重定向我的url

我有网址:-

http://example.com/r/index.php?id=1234
它给出了数据库中url的值。我将url的值存储在$url\u链接中

在同一页上,在db操作之后,我在主体部分添加了重定向代码

<?php    
header('Location: http://$url_link');    
?>


它不接受$url\u链接的值。

它应该是这样的

<?php    
  header('Location: http://'.$url_link);    
?>

应该是这样的

<?php    
  header('Location: http://'.$url_link);    
?>

用双引号括起来。。单引号内的变量将不会被解释

像这样做

<?php    
header("Location: http://$url_link");    
?>

用双引号括起来。。单引号内的变量将不会被解释

像这样做

<?php    
header("Location: http://$url_link");    
?>


需要看到更多的代码。需要看到更多的代码。