Varför fungerar inte detta?
Jag har tre filer: index.php som inkluderar proxy.php som i sin tur inkluderar cookie.php
index.php:
<?php
//include("cookie.php");
include("proxy.php");
?>
proxy.php
<?php
include("cookie.php");
?>
cookie.php
<?php
setcookie("test_data", 0, 0, 0, 0, 0);
?>
Jag får "Warning: Cannot modify header information - headers already sent by (output started at C:\Public\www\ts\test\proxy.php:1) in C:\Public\www\ts\test\cookie.php on line 2"
Men om jag i index.php byter ut include("proxy.php"); och istället gör include("cookie.php"); direkt så fungerar det!
Varför? Jag förstår ingenting. Det borde ju inte spela nån roll i hur många steg man gör include?
Det finns ingen output i nån av filerna (och det finns inget efter ?>).