Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/09/2020, 12:57
Avatar de Middrel
Middrel
 
Fecha de Ingreso: abril-2005
Mensajes: 835
Antigüedad: 19 años, 9 meses
Puntos: 27
Error en archivo xml

Hola, buenas tardes,

Tengo un error en mi código que no puedo solucionar, no entiendo bien lo que debo hacer en algunas guías que he estado leyendo. Les explico:

Tengo un archivo en php que genera un rss. Me funciona bien de manera local, pero al subirlo al servidor me marca lo siguiente:

Código PHP:
Resource interpreted as Stylesheet but transferred with MIME type application/xslt+xml
El error al parecer me m lo marca en esta línea:

Código PHP:
header('Content-type: text/xml; charset="UTF-8"', true);
    echo '<?xml version="1.0" encoding="UTF-8"?>
        <?xml-stylesheet href="css/stylesheet.xsl" type="text/xsl"?>';
En algunos casos mencionan que agregar en el archivo htaccess la directiva

AddType application/xslt+xml .xsl

Pero al agregarla sigue sin funcionar, marcando el mismo error.

¿Saben si debo cambiar algo en el código o configurar algo en el servidor?

De antemano, agradezco por sus comentarios. Saludos.