-1
The point is, I’m trying to open up a page before the header
from the main page is executed;
<?php
echo("<script language=\"javascript\">");
echo("window.open('teste.php', '_blank');");
echo("</script>");
header("Location: http://www.google.com");
?>
I’ve tried it this way, but when the page opens it goes straight to header
(redirecting to the google page and ignoring the opening of "test.php").
I’ve tried for a sleep
before the header
, but apparently also doesn’t make much sense in the execution. Why he just keeps ignoring and going straight to header
.
Some alternative?
Note: The "test.php" page has to necessarily open in a new tab, without being a popup or something similar, with the target = _blank
as in the little code I left behind
Strange that, should open test.php in new tab and generate an error Cannot Modify header information - headers already sent by
– user60252