Variable in Header
$c = 'Hello.php';
header('Refresh: 2; URL= $c ');
This i开发者_JAVA技巧s not working. Is this legal?
It is legal but you will need to use "" as string delimiters
$c = 'Hello.php';
header("Refresh: 2; URL= $c ");
Also see: http://nl.php.net/manual/en/language.types.string.php on single and double quoted strings
Variable interpolation only occurs in double quoted ("
) strings.
$c = 'Hello.php';
header("Refresh: 2; URL= $c");
精彩评论