Recently i had some great help from you guys with cracking the password on my site after being left in the lurch by my developer. Now i am trying to navigate round my site and seem to be learning new stuff everyday, so thanks to everyone
Now i am trying to change the default icon for my website which appears top left in most browsers and also the icon it uses in favourites. I have found lots of articles about changing the icon using favicon.ico in the root of the website on HTML but there doesnt appear to be much on getting it working in PHP. Anyone help? Sorry if this is an old subject but i did a couple of searches and couldn't find anything that appeared cover it from scratch.
A site written using PHP is still HTML. A site written in Java, or ASP, or Ruby, or Python, or anything is still HTML. HTML is just the text that is sent to the browser. What is on the server generating that text is totally separate to what's displayed in the browser.
Therefore anything that works for a static HTML site will also work for a PHP site. Create a favicon.ico file, stick it in the root directory of your site, and it'll work fine.
Thanks for your input about all code being HTML, ok i understand this and whilst i appreciate everything you have said, i have tried inserting the code everywhere that appears to be logical i.e. index.php and other files i would associate with being the first file loaded, none make the new icon appear therefore i have to assume that i am putting the code in the wrong file:
<link rel="shortcut icon" href="/favicon.ico">
Whilst all references on various websites i have found say to put this code between head and /head i can't locate this head section in any file. Please accept my apologies for my ignorance, i am just trying to bottom out a few things whilst i appoint a new php developer.
<doctype>
<html>
<head>
//stuff
</head>
<body>
//content of the page
</body>
</html>
The link tag for the favicon goes between the <head> and </head> tags. Where the code for the header stuff is though is anyone's guess ... I always put it in a file called /layout/header.inc.php but there's no standard way of doing it.
It would be a serious defect if there is no <head> section in your HTML, as delivered to the browser. If you can't locate it, I would guess it might be because perhaps there is an include file that contains the common <head> section for all files on that site, so that instead of repeating the section in every script, each PHP script would have a line like this at the beginning:
First, I would look at the Source for a page from your site in your browser. Can you see the <head> section there? If necessary, use the Find feature of whatever you are viewing the source with. If you find it there, but you can't find it in the PHP file on your server for that page, no doubt you will find an include statement in the PHP that brings it in from another file.