PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

How dow we add a title and a description to a php file?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How dow we add a title and a description to a php file?

    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

  • #2
    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:

    Code:
    print&#40;"<title>Title for this page</title>\n"&#41;;
    print&#40;"<meta name=\"description\" value=\"my page description\"\n"&#41;;
    Of course, this should also be inbetween <head></head> tags. Hope that helps.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      It is in the head but user echo instead of print.

      Do you think it makes a diffrence ?

      Comment


      • #4
        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.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment

        Working...
        X