- 2
In example code is not work
code is not run
3 ответов
+ 1
Which code?
0
Share the code here !
0
i guess the code is :
<?php
$value = "John";
<b>setcookie</b>("user", $value, time() + (86400 * 30), '/');
if(isset($_COOKIE['user'])) {
echo "Value is: ".$_COOKIE['user'];
}
//Outputs "Value is: John"
?>
the code playground show this message :
Parse error: syntax error, unexpected '<', expecting end of file in ..\Playground\ PHP Parse error: syntax error, unexpected '<', expecting end of file in ..\Playground\
and if i try to fix it by removing the <b> tag from the php code i have this message : Warning: Cannot modify header information - headers already sent by (output started at ..\Playground\:1) in ..\Playground\ PHP Warning: Cannot modify header information - headers already sent by (output started at ..\Playground\:1) in ..\Playground\
good coding :)