Bisa Posted October 23, 2008 Share Posted October 23, 2008 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? Link to comment https://forums.phpfreaks.com/topic/129779-solved-will-included-css-follow-along-if-you-include/ Share on other sites More sharing options...
trq Posted October 23, 2008 Share Posted October 23, 2008 You might want to post some relevent code. Link to comment https://forums.phpfreaks.com/topic/129779-solved-will-included-css-follow-along-if-you-include/#findComment-672836 Share on other sites More sharing options...
Bisa Posted October 23, 2008 Author Share Posted October 23, 2008 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 Link to comment https://forums.phpfreaks.com/topic/129779-solved-will-included-css-follow-along-if-you-include/#findComment-672977 Share on other sites More sharing options...
hmvrulz Posted October 23, 2008 Share Posted October 23, 2008 how can u inlcude files in ur header with not proper tags around it... ?? Link to comment https://forums.phpfreaks.com/topic/129779-solved-will-included-css-follow-along-if-you-include/#findComment-672985 Share on other sites More sharing options...
Bisa Posted October 23, 2008 Author Share Posted October 23, 2008 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 Link to comment https://forums.phpfreaks.com/topic/129779-solved-will-included-css-follow-along-if-you-include/#findComment-673005 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.