Jump to content

[SOLVED] Will included .css follow along if you include(); ?


Bisa

Recommended Posts

Just a quick question I need answered if I am to solve a charset problem.

 

Thing is I'm using a .css and then include() to get different pages on my site, when I include example1.php I'm able to see characters like "åöä" but if I include example2.php they show up as weird sets of characters.

 

any idea why I can include exampl1 one but not example2?

Well, there is not really any code to include. The index.php looks like this:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="se">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />

<head>

<link rel="stylesheet" type="text/css" href="css.css" />

<?php if($i==1) include("example1.php"); else include("example2.php"); ?>

 

example1.php and example2.php looks like this:

echo "Text with Swedish characters åäö";

 

note that there is no meta tags in either of the example files, they just print out text but in example one I can actually see the character and not some weird signs :-[

how can u inlcude files in ur header with not proper tags around it... ??

 

I just gave you the start of the head tag.

 

But never mind, I found out what was causing the problem.

 

I included a file, then included another one and the second time the meta tag had no influence over the printed text, rewrote the first include to the index file instead and I am now including all files from index instead of from example1.php

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.