View Full Version : How dow we add a title and a description to a php file?
lefrere
01-28-2005, 07:11 PM
Hi !
How dow we add a title and a description to a php file for indexing?
I tried the .desc method... but it seems that it's working only for plugin files
Any clues ?
Thanx all
Le Frere
Yes, .desc files only work for plugin supported file extensions.
A PHP file is just a server-side script which outputs HTML. So you need to make sure your PHP outputs the necessary <title> and meta tags. i.e. something like:
print("<title>Title for this page</title>\n");
print("<meta name=\"description\" value=\"my page description\"\n");
Of course, this should also be inbetween <head></head> tags. Hope that helps.
Anonymous
01-29-2005, 07:35 PM
It is in the head but user echo instead of print.
Do you think it makes a diffrence ?
No, echo would not make a difference.
Make sure you are indexing in Spider mode, if you wish to index PHP files. Remember that they are server-side scripts, so they need to be executed on a web server. If you index them in offline mode, only their source code would be indexed.
Another thing to check is whether the meta description tags are being printed within the <head></head> tags. This is required for it to be valid HTML. You can give us a URL to the file and we can confirm if this is the case.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.