Results 1 to 9 of 9
  1. #1

    When to use PHP and when not to?

    I am reworking the html on this site, and there are probelms with the footer and menus, I was wondering whether it would be wise to use php on this site with php include() tags? I would like to hear opinions on both sides.

    -Thanks
    Paul
    -Thanks

  2. #2
    Join Date
    Aug 2002
    Posts
    163
    I haven't got the slightest idea of what you are trying to accomplish but I always try to breakdown the design into smaller parts and use as much as includes as necessary.

    In your case I would use
    footer.php
    menu.php
    header.php

  3. #3
    yes i was talking exactly about breaking the page down like that, i was wondering if there any downsides to it?
    -Thanks

  4. #4
    Join Date
    Jan 2005
    Location
    Houston, TX
    Posts
    19
    Originally posted by total_assault
    yes i was talking exactly about breaking the page down like that, i was wondering if there any downsides to it?
    None, really. It's pretty standard.

  5. #5
    ok thanks for the info
    -Thanks

  6. #6

    there are problems

    there are problems if you want to be popular on the search engines. SE's doesn't like include commands and it could hurt your pagerank and or SERP's (Search Engine Result Positions).

    Programmingwise there is nothing bad about breaking your page in sections with Include statements. An I did not said that it will hurt your pagerank or anything, I said could hurt....
    http://www.ciclonpr.com
    Web Design - Web Hosting - SEO Services

  7. #7
    Join Date
    Jan 2005
    Location
    Houston, TX
    Posts
    19

    Re: there are problems

    Originally posted by jcrespi
    there are problems if you want to be popular on the search engines. SE's doesn't like include commands and it could hurt your pagerank and or SERP's (Search Engine Result Positions).

    Programmingwise there is nothing bad about breaking your page in sections with Include statements. An I did not said that it will hurt your pagerank or anything, I said could hurt....
    Note here: If you include content using any of the various PHP include commands, like include(), there will be no visible artifact of your having included that content. It will appear seamlessly on the user end (the end the SE robots see), as its sewn together by the server before being returned to the browser. The poster may be referring to using some kind of SSI approach, but frankly it's been so long since I've included outside of an application language that I can't remember how that works. Maybe he's also talking about people that include headers without including a facility for customizing content in those headers? I don't know.

  8. #8

    Re: Re: there are problems

    Originally posted by kevinbim
    Note here: If you include content using any of the various PHP include commands, like include(), there will be no visible artifact of your having included that content. It will appear seamlessly on the user end (the end the SE robots see), as its sewn together by the server before being returned to the browser. The poster may be referring to using some kind of SSI approach, but frankly it's been so long since I've included outside of an application language that I can't remember how that works. Maybe he's also talking about people that include headers without including a facility for customizing content in those headers? I don't know.
    Yes, This is true php runs at the server level not the browser level so it would the exact same thing as putting the html on each and everyone of those pages. Thinking more about this to myself i see the only downside would be an insignifacant amount of server load due to running the include() tags.
    -Thanks

  9. #9
    Join Date
    Jun 2005
    Posts
    89

    Re: Re: Re: there are problems

    Originally posted by total_assault
    Yes, This is true php runs at the server level not the browser level so it would the exact same thing as putting the html on each and everyone of those pages. Thinking more about this to myself i see the only downside would be an insignifacant amount of server load due to running the include() tags.
    Actually, the reverse is usually true. The includes generally get cached and that means only the one call to the server - can speed up page view times, not slow them down.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •