.php or .html ?

by 17 replies
20
Hi,

I'm going to build a clickbank vendor website. Nothing really advanced, I think... mostly static pages but will be running some scripts.

I'm a technical noob, but the way I understand it, it's easier to run those scripts if the pages have the .php extension as opposed to .html

Is there any downside to using that extension?

Sorry it my question is stupid
#programming #html #php
  • You should google php and html to find out what those are, they are more
    than just extensions.

    Google is your friend, you can find out tons of info pretty easily.

    Also youtube video site has tutorials on php and html , all free.
    • [ 1 ] Thanks
  • html files are directly put out by the server, php files are processed by a parser before spitting out html code. But if you are using php code in files then it will be a good idea to keep the extension php, else you will need to apply htaccess rules to parse html extension which in turn will slow down the output a bit .
  • I say always use php, that way you can use php at a later time if needed.
    It sucks if you indexed a bunch of html pages and need html.

    Plus, why would anyone ever want to make a header and footer for each page
    when you can make one with php.

    I hate it when someone calls me for help and wants me to change 20 or more html
    pages. Just do it right the first time and use php.
  • I personally like html over php but is is your call
    • [1] reply
    • first, i also would pretty much always use .php over.html however...

      there is probably a very slight hit to your server resources with php over html (certainly so if you are actually doing anything with php)

      most SEO types favor .htm or .html over .php (my guess is that was more of an issue in the past)
  • Banned
    [DELETED]
    • [1] reply
    • I prefer PHP. It will gives me more options to handle my site.
  • Banned
    [DELETED]
  • PHP and HTML interact a lot: PHP can generate HTML, and HTML can pass information to PHP. Before reading these faqs, it's important you learn how to retrieve variables from external sources. The manual page on this topic includes many examples as well. Pay close attention to what register_globals means to you too.
  • .php is more flexible than html. On the otherhand, HTML used to design websites while PHP is being used after the HTM Language.
  • Banned
    [DELETED]
  • I prefer to use PHP extension on your file, because it is easier to develope someday than HTML extension.
  • Banned
    [DELETED]
  • HTML with php is too good to run any scripts .Use this it will work very fine.All the best.
  • Anytime PHP coz it is much easy to use and implement on a website where as in HTML the workload is bit heavier than the PHP.
  • Hey You can't make a dynamic website in HTML. I think you have to read more about HTML and PHP...
    • [1] reply
    • You can use .php extension in any file..I'm also prefer .php
  • Hi in my opinion both are best for any type of scripting and easy way to developing.
  • Banned
    [DELETED]
  • Banned
    [DELETED]
  • Ok, obviously we don't have many(if any programmers) answering this question...

    Simple answer:
    If your planning on your pages never changing (i.e... once you create the page it never changes) go with .html and hand make every page.
    OR
    If you want to be able to add and remove pages, and change pages simply, by changing a database, then go with PHP and a .php extension.

    HTML is a static language only useful for layout, any processing of the page, whether for forms, or including headers and footers, requires a scripting language(like a browser parsed language i.e... Javascript or a server processed language like PHP or Perl)

    The Complete Answer: It really depends on how much work you are ready to put in, to get the site off the ground "now", and how much effort you are willing to put into it to maintain it "later"

    For example with all html only pages, you will have to hand edit each and every one, to add a new link, with php driven pages you can add the link to one file that is included in all the others. The php setup would require slightly longer to build, but 1/100th of the time to maintain later.

    Hope that helps...
    • [ 1 ] Thanks
    • [1] reply
    • I would recommend you to go for .php
  • Banned
    [DELETED]
  • Banned
    [DELETED]
  • PHP is more preferable.

Next Topics on Trending Feed

  • 20

    Hi, I'm going to build a clickbank vendor website. Nothing really advanced, I think... mostly static pages but will be running some scripts.