开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜