| | |
Having trouble with include command in IE (FF works fine)
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2007
Posts: 26
Reputation:
Solved Threads: 0
Hi,
I'm having a classic 'doesn't work in IE but works in FF' problem.
I have a site http://learn-croatian.com/apdejt and I wanted to make it easier for me to update metas in all pages with help from php. I'd change the php variables in a central file which is included in every page. Here's what I did:
Here is the meta.txt file:
Well, it doesn't work in IE 6. Please hit the link I gave above with FF and IE both. You'll see what I'm talking about. However, if I don't use the include command and just insert the code from the meta.txt file everything works fine (except the fact that the picture in the header is pushed down too much which can be seen with IE even now). But if I do that, I'll have to modify each page manually when I want to change the metas one day.
Please help!
I'm having a classic 'doesn't work in IE but works in FF' problem.
I have a site http://learn-croatian.com/apdejt and I wanted to make it easier for me to update metas in all pages with help from php. I'd change the php variables in a central file which is included in every page. Here's what I did:
php Syntax (Toggle Plain Text)
<?php include ("meta.txt"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title><?php echo "$naslov"; ?>Homepage</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="<?php echo "$opis"; ?>" /> <meta name="keywords" content="<?php echo "$kljucne"; ?>"/> <meta name="author" content="<?php echo "$autor"; ?>" /> <link rel="stylesheet" type="text/css" href="style.css" /> <meta name="copyright" content="Learn-Croatian.com" /> <meta http-equiv="content-language" content="en, hr" /> <!--[if IE]> <style type="text/css"> * html .ex{padding-bottom:32767px;margin-bottom:-32767px;} </style> <![endif]--> </head>
Here is the meta.txt file:
php Syntax (Toggle Plain Text)
<?php $opis="Learn-Croatian.com is the site for grasping the basics of the Croatian language for free!"; $kljucne="horvatsko, chorvatsko, book, croatian, lessons, lesson, adjectives, verbs, nouns, pronouns, croatia, language, hrvatski, hrvatska, croatian, jezik, learn, free, phrasebook, phrases, recordings, translations, tourist, tourism, holidays, vacations, trips, istria, istra, slavonija, slavonia, dalmatia, dalmacija, zagreb, no, charge, online, trips, vacations, holidays, kroatiska"; $naslov="Learn Croatian for free | "; $autor="Tomislav - contact@learn-croatian.com"; ?>
Well, it doesn't work in IE 6. Please hit the link I gave above with FF and IE both. You'll see what I'm talking about. However, if I don't use the include command and just insert the code from the meta.txt file everything works fine (except the fact that the picture in the header is pushed down too much which can be seen with IE even now). But if I do that, I'll have to modify each page manually when I want to change the metas one day.
Please help!
Last edited by poslanik; Mar 7th, 2007 at 12:35 pm.
Hi there,
I did not notice any problem here. Please note code as rendered from IE, FF and Opera 9
Opera:
<meta name="description" content="Learn-Croatian.com is the site for grasping the basics of the Croatian language for free!" />
<meta name="keywords" content="horvatsko, chorvatsko, book, croatian, lessons, lesson, adjectives, verbs, nouns, pronouns, croatia, language, hrvatski, hrvatska, croatian, jezik, learn, free, phrasebook, phrases, recordings, translations, tourist, tourism, holidays, vacations, trips, istria, istra, slavonija, slavonia, dalmatia, dalmacija, zagreb, no, charge, online, trips, vacations, holidays, kroatiska"/>
<meta name="author" content="Tomislav - contact@learn-croatian.com" />
<link rel="stylesheet" type="text/css" href="style.css" />
<meta name="copyright" content="Learn-Croatian.com" />
<meta http-equiv="content-language" content="en, hr" />
IE 6 winxpsp2:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="Learn-Croatian.com is the site for grasping the basics of the Croatian language for free!" />
<meta name="keywords" content="horvatsko, chorvatsko, book, croatian, lessons, lesson, adjectives, verbs, nouns, pronouns, croatia, language, hrvatski, hrvatska, croatian, jezik, learn, free, phrasebook, phrases, recordings, translations, tourist, tourism, holidays, vacations, trips, istria, istra, slavonija, slavonia, dalmatia, dalmacija, zagreb, no, charge, online, trips, vacations, holidays, kroatiska"/>
<meta name="author" content="Tomislav - contact@learn-croatian.com" />
<link rel="stylesheet" type="text/css" href="style.css" />
<meta name="copyright" content="Learn-Croatian.com" />
<meta http-equiv="content-language" content="en, hr" />
FFOX 2.0.2:
<meta http-equiv="content-type" content="text/html; charset=windows-1250" />
<meta name="description" content="Learn-Croatian.com is the site for grasping the basics of the Croatian language " />
<meta name="keywords" content="horvatsko, chorvatsko, book, croatian, lessons, lesson, adjectives, verbs, nouns, pronouns, croatia, language, hrvatski, hrvatska, croatian, jezik, learn, free, phrasebook, phrases, recordings, translations, tourist, tourism, holidays, vacations, trips, istria, istra, slavonija, slavonia, dalmatia, dalmacija, zagreb, no, charge, online" />
<meta name="author" content="Tomislav - nomad2389@gmail.com" />
<link rel="stylesheet" type="text/css" href="style.css" />
<meta name="copyright" content="Learn-Croatian.com" />Are you sure you were looking the source of the same file? It seems OK.
Note that normally it is the PHP parser that passes the info to the browser, so if any problem occurs it should be php / serverside related, rather than a browser problem.
Cheers!
I did not notice any problem here. Please note code as rendered from IE, FF and Opera 9
Opera:
<meta name="description" content="Learn-Croatian.com is the site for grasping the basics of the Croatian language for free!" />
<meta name="keywords" content="horvatsko, chorvatsko, book, croatian, lessons, lesson, adjectives, verbs, nouns, pronouns, croatia, language, hrvatski, hrvatska, croatian, jezik, learn, free, phrasebook, phrases, recordings, translations, tourist, tourism, holidays, vacations, trips, istria, istra, slavonija, slavonia, dalmatia, dalmacija, zagreb, no, charge, online, trips, vacations, holidays, kroatiska"/>
<meta name="author" content="Tomislav - contact@learn-croatian.com" />
<link rel="stylesheet" type="text/css" href="style.css" />
<meta name="copyright" content="Learn-Croatian.com" />
<meta http-equiv="content-language" content="en, hr" />
IE 6 winxpsp2:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="Learn-Croatian.com is the site for grasping the basics of the Croatian language for free!" />
<meta name="keywords" content="horvatsko, chorvatsko, book, croatian, lessons, lesson, adjectives, verbs, nouns, pronouns, croatia, language, hrvatski, hrvatska, croatian, jezik, learn, free, phrasebook, phrases, recordings, translations, tourist, tourism, holidays, vacations, trips, istria, istra, slavonija, slavonia, dalmatia, dalmacija, zagreb, no, charge, online, trips, vacations, holidays, kroatiska"/>
<meta name="author" content="Tomislav - contact@learn-croatian.com" />
<link rel="stylesheet" type="text/css" href="style.css" />
<meta name="copyright" content="Learn-Croatian.com" />
<meta http-equiv="content-language" content="en, hr" />
FFOX 2.0.2:
<meta http-equiv="content-type" content="text/html; charset=windows-1250" />
<meta name="description" content="Learn-Croatian.com is the site for grasping the basics of the Croatian language " />
<meta name="keywords" content="horvatsko, chorvatsko, book, croatian, lessons, lesson, adjectives, verbs, nouns, pronouns, croatia, language, hrvatski, hrvatska, croatian, jezik, learn, free, phrasebook, phrases, recordings, translations, tourist, tourism, holidays, vacations, trips, istria, istra, slavonija, slavonia, dalmatia, dalmacija, zagreb, no, charge, online" />
<meta name="author" content="Tomislav - nomad2389@gmail.com" />
<link rel="stylesheet" type="text/css" href="style.css" />
<meta name="copyright" content="Learn-Croatian.com" />Are you sure you were looking the source of the same file? It seems OK.
Note that normally it is the PHP parser that passes the info to the browser, so if any problem occurs it should be php / serverside related, rather than a browser problem.
Cheers!
" Of all the things I've lost,
I miss my mind the most...."
Mark Twain
I miss my mind the most...."
Mark Twain
•
•
Join Date: Feb 2007
Posts: 26
Reputation:
Solved Threads: 0
Yes I do have a piece of code before DOCTYPE, I've said so in my initial post. However, in Firefox it looks fine. I don't know why everything is ok in your IE, because in mine it looks like this (the third column starts after the fold):
http://img.photobucket.com/albums/v1...sta/skrini.jpg
The code you pasted looks fine (the metas are ok and everything) but I can't get it to work in IE. Could you please take a screenshot of the site while viewing it with IE?
http://img.photobucket.com/albums/v1...sta/skrini.jpg
The code you pasted looks fine (the metas are ok and everything) but I can't get it to work in IE. Could you please take a screenshot of the site while viewing it with IE?
•
•
•
•
P.S. I just had my friend take a screenshot of the site in IE and it came out same as mine. He's having problems too.
Does anyone know why including files with php screwes up pages in IE?
Now, what I have noticed is that there are some invalid characters in your code on several places. But I doubt that it is the main reason for having it all distorted like that.
I see you have some number of improperly closed divs, that may be the reason for such distortion. I will take a closer look, and will advise, meantime, do you use a tool like dreamweaver, or something else to edit the page?
" Of all the things I've lost,
I miss my mind the most...."
Mark Twain
I miss my mind the most...."
Mark Twain
•
•
Join Date: Apr 2005
Posts: 19
Reputation:
Solved Threads: 0
Well, one thing I've noticed with PHP & IE... (Well, to be more precise: the HTML that results in our use of PHP)... is....
The first line actually sends a newline to the browser before continuing to the DOCTYPE line. If we put a <? php line here ?>we might want to continue the rest of the html directly after the php closing since sometimes a newline throws off a structured graphic design.
mediaphyte dot com
The first line actually sends a newline to the browser before continuing to the DOCTYPE line. If we put a <? php line here ?>we might want to continue the rest of the html directly after the php closing since sometimes a newline throws off a structured graphic design.
mediaphyte dot com
![]() |
Similar Threads
- Screen flickers with DVI cable, works fine with analog (Monitors, Displays and Video Cards)
Other Threads in the PHP Forum
- Previous Thread: opening parent page by clicking url of iframe?
- Next Thread: Article Directory
| Thread Tools | Search this Thread |
apache api array beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external fcc file files folder form forms forum freelancing function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction menu method mlm mod_rewrite multiple mysql neutrality oop pageing pagerank paypal pdf php phpmysql play problem query question radio random recursion remote root script search select server sessions sms soap source space sql support! syntax system table template tutorial update upload url validator variable video web youtube






you need to open the apdejt folder.