Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/08/2014, 04:59
DvNe
 
Fecha de Ingreso: octubre-2012
Mensajes: 37
Antigüedad: 11 años, 7 meses
Puntos: 0
Php incrustado en html

Buenas, estoy intentando hacer una página web que lleva trozos de php, antes de realizar la página web he intentado ver si consigo ejecutar correctamente las instrucciones de php y he realizado el siguiente HTML:

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4.  
  5.     <title>sin título</title>
  6.     <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  7.     <meta name="generator" content="Geany 1.23.1" />
  8. </head>
  9.  
  10.     <?php
  11.         echo "<img src='./en_construccion.png' border='0' width='300' height='100'>";
  12.     ?>
  13. </body>
  14. </html>

Luego, las he metido en mi carpeta htdocs del xampp version 1.8.2. He leído por ahí que hay que modificar el archivo httpd.conf para que apache ejecute correctamente el php. Me han dicho que busque una línea donde ponga:

AddType application/xhttpdphp .php


Y la cambie por:

AddType application/xhttpdphp .php .phtml .html .js


Pero la línea que había en mi httpd.conf original era:

AddType text/html .shtml


Aún siendo distinta, la he cambiado por:

AddType application/xhttpdphp .php .phtml .html .js



Pero al abrir mi código HTML (anteriormente mostrado) con Chrome y Firefox, sólo veo esto:

"; ?>