// read header
// ver|main_title|sub_title=abcedef....
// 000001 - doc=0000 title
// 000002 - doc=0000 keywords
// 000003 - doc=0000 description
function ReadPageHeader($code,$dheader)
{
If (file_exists("header.txt")) {
$file = fopen("header.txt", "r");
while(! feof($file)) {
$Line1 = fgets($file);
if (Substr($Line1,0,6) == $code) {
$urlheader = Substr($Line1,7,strlen($Line1)-9);
return $urlheader;
break;
// }
}
}
fclose($file);
} else {
return $dheader;
}
}
<META NAME="keywords" CONTENT="<? echo ReadPageHeader($doc.'01',$dheader); ?>">
<META NAME="description" CONTENT="<? echo ReadPageHeader($doc.'02',$dheader); ?>">
<title><? echo ReadPageHeader($doc."03",$dheader); ?></title>