Reply to Re: Simple header file that doesn't work rightly...

Your name:

Reply:


Posted by iktorn on 06/12/07 14:23

MM napisał(a):
> Hi everybody,
> what do you think about this problem?
> I want to create a HTML header file with 2 variables, as below:
> -----------------------------
> $title = "Title of document";
> $style = "./style/style.css";
>
> print<<<HED
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
> www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>$title</title>
> <meta http-equiv = 'Content-Type' content='text/html;
> charset=iso-8859-1'>
> <meta http-equiv = 'Content-Style-Type' content = 'text/css'>
> <link href = '$style' rel = 'stylesheet' type = 'text/css'>
> </head>
> <body>
> HED;
> -----------------------------
>

I don't see any problems in this piece of code on my computer.
Why don't you simply use

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?php echo $title; ?></title>
<meta http-equiv = 'Content-Type' content='text/html; charset=iso-8859-1'>
<meta http-equiv = 'Content-Style-Type' content = 'text/css'>
<link href = "<?php echo $style; ?>" rel = 'stylesheet' type = 'text/css'>
</head>
<body>

?

--
Wiktor Walc
http://phpfreelancer.net

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация