tengo esto:
<html>
<head>
<title><? echo $dir2; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
$url = explode("/",$PHP_SELF);
$filename2 = $url[sizeof($url)-1];
$dir2 = $url[sizeof($url)-2];
// echo "El dir2 es: ".$dir2."<BR>";
/**echo "<script>document.location.href='../my.php?w=".$dir2."'</script>";
**/
header("Location:'../my.php?w=".$dir2."'");
exit;
?>
</body>
</html>
y me da este error:
Warning: Cannot modify header information - headers already sent by (output started at /x.php:2) inx.php on line 10
Por ke?
NOTa:
Se que si quito todo el html funca, pero Necesito ese html y sobre todo decir en el head el nombre de $dir2.
Otra opcion de redirigir en este caso usando html arriba.?