Ver Mensaje Individual
  #13 (permalink)  
Antiguo 12/01/2015, 09:38
Avatar de GeekGirl
GeekGirl
 
Fecha de Ingreso: julio-2014
Mensajes: 423
Antigüedad: 9 años, 9 meses
Puntos: 44
Respuesta: Header no redirecciona

Perdón, en realidad están mal ubicados el ob_start() y el ob_end_flush().

En el archivo php donde ejecutas el JS, al comienzo de todo, incluso antes de tu session_start(), agregá el ob_start() y al final de todo en ob_end_flush().

Ejemplo:

Código PHP:
<?php 
ob_start
();

$identifica=$_GET['iden']; 
$iden=$identifica
?> 
<script language="JavaScript">  
if (screen.width<=600)  
   <?php header("Location: pruebadivs.php?iden=".$iden); ?> 
else  
  <?php header("Location: indeednuevo.php?iden=".$iden); ?> 
</script>
<?php
// Supongamos que acá termina tu archivo

ob_end_flush();
?>
Con eso debería funcionar.
Saludos :)