Ver Mensaje Individual
  #15 (permalink)  
Antiguo 26/09/2011, 14:39
Avatar de Ribon
Ribon
 
Fecha de Ingreso: septiembre-2010
Ubicación: El firmamento
Mensajes: 487
Antigüedad: 13 años, 7 meses
Puntos: 91
Respuesta: Parse error: syntax error, unexpected $end in...

Copié y pegué todo el código en mi editor de scripts y me tira error en muchas lineas, lo raro es que en esas lineas no hay error, lo que hice fue borrar todos los espacios en blanco y me fué cambiando y al final me quedó bien :S

Revisa, no estoy seguro pero quizás y sea la codificación de los archivos que te está trayendo problemas. quizás el paso de un sistema de archivo a otro te lo corrompió digo xD!

Saludos.

Copio y pego el código que a mi no me da error

Código PHP:
Ver original
  1. <?php
  2. $_SESSION['activo'] = 'index';
  3.  
  4. require_once("funciones/avanzadasBD.php");
  5. $noticias = traer_noticias(4);
  6. ?>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. * * <head>
  10. * * * * <?php include_once "comun/head.php"; ?>
  11. * * </head>
  12. * * <body>
  13. * * * * <div id="web">
  14. * * * * * * <?php include_once "comun/cabecera.php"; ?>
  15. * * * * * * <div id="menu">
  16. * * * * * * * * <?php include_once "comun/menu.php"; ?>
  17. * * * * * * </div>
  18. * * * * * * <div id="pagina">
  19. * * * * * * * * <div id="borde">
  20. * * * * * * * * * * <div id="contenido">
  21. * * * * * * * * * * * * <!-- Showcase -->
  22. * * * * * * * * * * * * <div id="showcase" class="showcase">* * * * * * * * * * * * * *
  23. * * * * * * * * * * * * * * <?php
  24.                                 foreach($noticias as $fila){
  25.                             ?>
  26. * * * * * * * * * * * * * * * * * * <div class="showcase-slide">
  27. * * * * * * * * * * * * * * * * * * * * <div class="showcase-content">
  28. * * * * * * * * * * * * * * * * * * * * * * <img src="<?php echo $fila[1]; ?>"/>
  29. * * * * * * * * * * * * * * * * * * * * </div>
  30. * * * * * * * * * * * * * * * * * * * * <div class="showcase-caption">
  31. * * * * * * * * * * * * * * * * * * * * * * <b><?php echo $fila[2]; ?></b><br/>
  32. * * * * * * * * * * * * * * * * * * * * * * <?php echo $fila[3]; ?>
  33. * * * * * * * * * * * * * * * * * * * * </div>
  34. * * * * * * * * * * * * * * * * * * </div>
  35. * * * * * * * * * * * * * * * * <?php } ?>
  36. * * * * * * * * * * * * </div>
  37. * * * * * * * * * * * * <!-- Showcase --> * * * * * * * * * * * * * * * * *
  38. * * * * * * * * * * * * <!-- Noticias -->
  39. * * * * * * * * * * * * <div id="noticias_index">
  40. * * * * * * * * * * * * <?php
  41.                             $cont = 1;
  42.                             foreach ($noticias as $fila) {
  43.                             if (($cont%2)==0)
  44.                                 $class = 'nt_par';
  45.                             else
  46.                                 $class = 'nt_impar';
  47.                         ?>
  48. * * * * * * * * * * * * * * * * <div id="noticia_index" class="<?php echo $class; ?>">
  49. * * * * * * * * * * * * * * * * * * <div id="nt_img"><img src="<?php echo $fila[1]; ?>" style="width:134px; height:90px;"></div>
  50. * * * * * * * * * * * * * * * * * * <div id="nt_fec"><?php echo date_format(date_create($fila[5]), 'd-m-Y'); ?></div>
  51. * * * * * * * * * * * * * * * * * * <div id="nt_tit"><?php echo $fila[2]; ?></div>
  52. * * * * * * * * * * * * * * * * * * <div id="nt_res"><?php echo $fila[3]; ?></div>
  53. * * * * * * * * * * * * * * * * </div>
  54. * * * * * * * * * * * * * * <?php $cont++; } ?>
  55. * * * * * * * * * * * * </div>
  56. * * * * * * * * * * * * <!-- Noticias -->
  57. * * * * * * * * * * </div>
  58. * * * * * * * * * * <div id="lateral">
  59. * * * * * * * * * * * * <?php include_once "comun/lateral.php"; ?>
  60. * * * * * * * * * * </div>
  61. * * * * * * * * </div>
  62. * * * * * * </div>
  63. * * * * * * <div id="pie"></div>
  64. * * * * </div>
  65. * * </body>
  66. </html>


EDIT: OMG, ya te diste cuenta como me cambio todos los espacios en blanco por asteriscos en cambio los que cambié yo los dejó bien :S???