Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/12/2009, 15:48
MetalWolf
 
Fecha de Ingreso: marzo-2009
Mensajes: 29
Antigüedad: 15 años, 2 meses
Puntos: 0
Mostrar Codigo HTML con PHP!!

Hola como dice el titulo deseo mostrar el codigo HTML de un archivo a traves del PHP, por lo que se, se muestra a traves de la funcion file(), encontre un codigo que lo hace q es este:

Código PHP:
<?
      $url 
'CPC/D1/tabla1.php';
      
$lineas file_get_contents($url);
          for (
$i 0$i <count($lineas); $i++) {
              
$total $total.htmlentities($lineas[$i]);
          }
       echo 
$total;
       
      
?>
pero ahora viene mi problema deseo mostrar este codigo pero sin que se muestre el PHP:

Código PHP:
<table width="588" align="center" cellspacing="0" class="barmenu" id="previsualizacion">
  <tr>
    <td bgcolor="#999999"><table width="100%" border="0" cellspacing="0">
      <tr>
        <td colspan="6" align="center" valign="middle"><?
        
if($_COOKIE["CLNAMETXT"]==true){
        echo 
'<font color=\"#000000\" size=\"10\">'.$_COOKIE["CLNAMETXT"].'</font>';
        }else{echo 
$_COOKIE["CLNAMEIMG"];}
        
?></td>
      </tr>
      <tr>
        <td width="262" rowspan="4" valign="top"><?
        
if($_COOKIE["CLLOGOIMG"]==true){?>
          <img src="<? echo $_COOKIE["CLLOGOIMG"]; ?>" alt="" width="262" height="262" />
          <?
        
}
        
?></td>
        <td height="139" colspan="5"><table width="100%" border="0" cellspacing="0">
          <tr>
            <td colspan="4" bgcolor="#666666"><strong>Equipo:</strong></td>
          </tr>
          <tr>
            <td width="108" height="150" align="center" valign="top" ><table width="100" border="1" cellspacing="0" bordercolor="#000000">
              <tr>
                <td width="100" height="150" valign="top" bgcolor="#FFFFFF">Nombre:<strong> <? echo $_COOKIE["NAMEJ1"]; ?></strong><br />
                  Edad: <strong><? echo $_COOKIE["EDJ1"]; ?></strong><br />
                  Valor: <strong><? echo $_COOKIE["VAJ1"]; ?></strong><br />
                  Salario:<strong> <? echo $_COOKIE["SAJ1"]; ?></strong><br /></td>
              </tr>
            </table></td>
            <td height="150" colspan="2" align="center" valign="top"><table width="100" height="152" border="1" align="center" cellspacing="0" bordercolor="#000000">
              <tr>
                <td width="100" height="150" valign="top" bgcolor="#FFFFFF">Nombre: <strong><? echo $_COOKIE["NAMEJ2"]; ?></strong><br />
                  Edad: <strong><? echo $_COOKIE["EDJ2"]; ?></strong><br />
                  Valor: <strong><? echo $_COOKIE["VAJ2"]; ?></strong><br />
                  Salario: <strong><? echo $_COOKIE["SAJ2"]; ?></strong><br /></td>
              </tr>
            </table></td>
            <td width="108" height="150" align="center" valign="top"><table width="100" border="1" cellspacing="0" bordercolor="#000000">
              <tr>
                <td width="100" height="150" valign="top" bgcolor="#FFFFFF">Nombre: <strong><? echo $_COOKIE["NAMEJ3"]; ?></strong><br />
                  Edad: <strong><? echo $_COOKIE["EDJ3"]; ?></strong><br />
                  Valor: <strong><? echo $_COOKIE["VAJ3"]; ?></strong><br />
                  Salario: <strong><? echo $_COOKIE["SAJ3"]; ?></strong><br /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="118" colspan="2" align="right" valign="top"><table width="100" border="1" cellspacing="0" bordercolor="#000000">
              <tr>
                <td height="150" align="left" valign="top" bgcolor="#FFFFFF">Nombre: <strong><? echo $_COOKIE["NAMEJ4"]; ?></strong><br />
                  Edad: <strong><? echo $_COOKIE["EDJ4"]; ?></strong><br />
                  Valor: <strong><? echo $_COOKIE["VAJ4"]; ?></strong><br />
                  Salario: <strong><? echo $_COOKIE["SAJ4"]; ?></strong><br /></td>
              </tr>
            </table></td>
            <td height="150" colspan="2" align="left" valign="top"><table width="100" border="1" cellspacing="0" bordercolor="#000000">
              <tr>
                <td height="150" align="left" valign="top" bgcolor="#FFFFFF">Nombre: <strong><? echo $_COOKIE["NAMEJ5"]; ?></strong><br />
                  Edad: <strong><? echo $_COOKIE["EDJ5"]; ?></strong><br />
                  Valor: <strong><? echo $_COOKIE["VAJ5"]; ?></strong><br />
                  Salario: <strong><? echo $_COOKIE["SAJ5"]; ?></strong><br /></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="24" colspan="5">&nbsp;</td>
      </tr>
      <tr>
        <td height="24" colspan="5">&nbsp;</td>
      </tr>
      <tr>
        <td width="79">&nbsp;</td>
        <td width="104">&nbsp;</td>
        <td width="89">&nbsp;</td>
        <td width="15">&nbsp;</td>
        <td width="21">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
Y lo que sucede es que me muestra tambn el php escrito en el codigo... como podria ahcer para que se muestre el resultado correcto??

Gracias por su ayuda.
Saludos.