What is The Differnece

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Produced
    Sergeant Major

    • Sep 2007
    • 88

    What is The Differnece

    what is the differnce between .php and .html? and wich one would be better to use?



  • Vasili
    Moderator

    • Mar 2006
    • 14683

    #2
    Re: What is The Differnece

    Depends on what you are trying to do.....since you only registered your domain a few days ago, you have been asking a lot of questions with very unclear indications of what you are thinking of, what you are trying to do, or how we can offer any advice in a specific manner.

    You might get a clearer idea of what you website Plan might include by reviewing the many features offered by VodaHost and that are included in every account. If by seeing some mention of utility or function in this list you are inspired to know more detail, you might try performing a Key Word search of these forums, which will pull up every previous mention (including numerous questions) as well as many solutions and techniques that could offer a better explanation that the "shot in the dark" method you are relying on now.

    Often also, many are enlightened simply by reading the many threads in the organized forums that make up VodaTalk, and being persistent enough to drill in to previous pages beyond the first page that presents.....there are literally over 100,000 posts in these forums, dealing with many eclectic nusance of web development and possibilities.

    We are here to help, but it is often difficult to know how when questions are posed unclearly or without enough "framework" to decipher your meaning....
    . VodaWebs....Luxury Group
    * Success Is Potential Realized *

    Comment

    • Phoubers
      Sergeant

      • Oct 2007
      • 34

      #3
      Re: What is The Differnece

      Well for starters, HTML is Hyper Text Markup Language.

      Php is PHP Hypertext Preprocessor

      You must use html in every web page. In some cases you don't need the .html extension. If you have php in your web page it must be labeled .php, even though your page has php you must have html in your page. An example is

      Document Name: index.html

      <html>
      <head>
      <title>My Site</title>
      </head>
      <body>
      Some Stuff here
      </body>
      </html>

      An Example with php

      Document Name: index.php

      <html>
      <head>
      <title>My Php Site</title>
      </head>
      <body>
      <?php //Even though we have php in our page we must still have those basic html codes and our page must be labeled with a php extension ?>
      </body>
      </html>

      I hope this helped.

      Matt
      No its not Fowbers its foobers :D

      Comment

      • Vasili
        Moderator

        • Mar 2006
        • 14683

        #4
        Re: What is The Differnece

        Good technical example, Matt, but is it really an answer that he can use?
        . VodaWebs....Luxury Group
        * Success Is Potential Realized *

        Comment

        • Watdaflip
          Major General

          • Sep 2005
          • 2116

          #5
          Re: What is The Differnece

          .html is for a static webpage, it loads the same data every time it is executed in your browser. If you plan on making the basic website, .html will do.

          .php is file for a scripting/programming language (the PHP language), it allows you to have a much more dynamic website, that is the content on your page can change based on a predetermined set of conditions. It allows you to do things like draw information from a database and display it, generate images, pdf's, zip archives, or downloads on the fly. You can upload files to your website, create a user management system (user register/login), any many many other cool things.

          Probably one of the most immediate and best example of php I can give is this forum you are using right now. It is created uses php, and uses a database to store content.

          As Phoubers has explained no matter what extension you use, nearly any file type that you can load in your browser uses HTML to display the content that you see, the difference between .html and .php is that this HTML code that is used is static in a .html file, but in .php can change every time the page loads to display different content.

          I hope that helps

          PS. I personally use .php 99% of the time, regardless if the .php file will contain a php script or not. This way if I ever want to add one, I don't have to worry about changing the file type, and consequently all of my links to that file.

          Register/Login Script
          Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

          Comment

          Working...
          X