Jump to content

Doctype dosent work after include ?


Splitti
 Share

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
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.

Link to comment
Share on other sites

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 ??

Link to comment
Share on other sites

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>

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

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.