Converstion from html to php

Discussion in 'PHP' started by tptnyc, Aug 25, 2008.

  1. #1
    Is there any tool to convert index.html to index.php or can find some help on this?
     
    tptnyc, Aug 25, 2008 IP
  2. ForumJoiner

    ForumJoiner Active Member

    Messages:
    762
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    83
    #2
    Why do you need to convert it? Based on your answer, I can give you more options.
     
    ForumJoiner, Aug 25, 2008 IP
  3. GingerApple

    GingerApple Peon

    Messages:
    803
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You don't need to convert it as such, just change the file extension. I prefer Notepad on Windows for this.

    The reason you can just change the file extension is that PHP is written in HTML, except for the special programming bits inserted in it every now and again.
     
    GingerApple, Aug 25, 2008 IP
  4. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Giving extension as .php is ok but what all php codings come on the top and at the bottom to do it right? newbie
     
    tptnyc, Aug 25, 2008 IP
  5. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #5
    Keeping your php code seperate from the html makes it far easier to edit at some future point but it is not an abosolute requirement.

    One thing you should consider as you make the conversion is to make your header, footer, navigation and any ads a seperate page and then include them on your main pages. That way when you edit one header page the changes take place on all your pages.

    If you change from adsense to amazon you just edit the pages with the JS and it changes on all pages.
     
    Colbyt, Aug 25, 2008 IP