Reputation: 167
I have a small problem.
On some of my pages I cannot make favicon to be shown.
On some pages everything is fine, and favicon is shown properly, however on other sites I cannot make the favicon to appear. I tried putting the ico file in the main directory, but without any results.
This file1.php is working fine:
<? include("core/config.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="include/style.css" rel="stylesheet" type="text/css">
<title>Title</title>
<link rel="shortcut icon" type="image/x-icon" href="img/flavico.fw.ico">
<script type="text/javascript" src="include/script.js"></script>
</head>
However on this one favicon is not showing:
<?php include("core/config.php");
include("include/resolution.php");
function new_function($nazwa){
global $wys;
global $db;
$wys->some_function($ub,$na,$ub_pod);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
<link rel="shortcut icon" type="image/x-icon" href="img/flavico.fw.ico">
<link href="include/style.css" rel="stylesheet" type="text/css">
</head>
I assume that this problem is caused by php functions, right?
Upvotes: 2
Views: 2120
Reputation: 518
Please show urls for both pages. Guess your problem in relative urls. Assume that first url was http://mysite.org/file1.php and second was http://mysite.org/subsecrion/file2.php then you should either use absolute path for favicon:
<link rel="shortcut icon" type="image/x-icon" href="/img/flavico.fw.ico">
or add tag:
<base href="http://mysite.org/">
Upvotes: 3