Jump to content

PHP Include in <title> </title>


Kevin M

Recommended Posts

I was wondering, is it possible to use an Include in the <title> </title> area of the document? So if I changed the name or slogan of my site, I wouldn't have to go through and edit the title of each page, I could do it by editing the title.txt or whatever I called it file.Eg:

<html><head><title><?php include("title.txt"); ?></title></head><body></body></html>

And then have the title.txt file contain something like : W3Schools Online Web Tutorials (Not that title though)Thanks,Kevin

Link to comment
Share on other sites

i tested it out, and it seemed to work for mehowever..google and search engines in general dont like the same title on several pages, they like different titles for different pages, it also tells the user (to some extent) whats on the page, especially if they click on a search result, as the title is the main text you see in a search engine result, and the bit you click on.:)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...