开发者

Variable in Header

开发者 https://www.devze.com 2023-03-08 06:42 出处:网络
$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 ');

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号