Jump to content

Doctype dosent work after include ?


Splitti

Recommended Posts

Hi all :)

This is my first post on this forum, so i hope i follow the rules proberly :P

 

Well i got this index.php where i got a Doctype in it :

(

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

)

and here is my problem, when i include another php file then the doctype dont work on that php file, (The doctype should show the Danish charecters, ÆØÅ - æøå and it dont, after a include.)

why is that ??

and what can i do ??

Link to comment
https://forums.phpfreaks.com/topic/219219-doctype-dosent-work-after-include/
Share on other sites

Cannot really help you with the specific problem you are having unless you post enough code that reproduces the problem.

 

There are literally a dozen different things that could be causing the symptom and you have got to show what you are doing in order to narrow down that list.

Yes i know that i cant dump html into a php code, but that is not the poblem. :)

 

My problem is that the doctype works on my index page but if i include 'something.php'; into my index page, then the doctype dont work on the included page.

 

My index.php

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

</head>

<body>

<?

include 'www/indhold.php';      <--------- On this page dosent the doctype work.

?>

</body>

</html>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

why is that ??

and what can i do ??

Okay, heres my index.php

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

</head>

<body>

<?

include 'www/indhold.php';      <--------- On this page dosent the doctype work.

?>

</body>

</html>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

here is the included file. that dont show the danish charecters ÆØÅ

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div>

  Some text with ÆØÅ danish charrecter æøå

</div>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Try this page format

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

</head>

 

<body>

 

<?php include("http://www.link.com/"); ?>

 

</body>

</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.