Ali na localhost dobjem sledecu gresku: Warning: stristr() [function.stristr]: Empty delimiter in C:\xampp\htdocs\site\header_includes.php on line 8
header_includes.php
<?php
$page_head_tags = "";
function add_to_head($tag=""){
global $page_head_tags;
if(!stristr($page_head_tags, $tag)){
$page_head_tags .= $tag."\n";
}
}?>
header.php
<?php
include("header_includes.php");
?>
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test Site</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" href="stil.css" type="text/css" media="screen" />
<?php if (function_exists("add_to_head")) { echo add_to_head(); } ?>
</head>
<body>
index.php
<?php
include_once("header.php");
add_to_head("<link rel='stylesheet' href='blue.css' type='text/css' media='screen' />");?>