html or php?

Discussion in 'HTML & Website Design' started by JasMate, Jul 27, 2006.

  1. JasMate

    JasMate Active Member

    Messages:
    2,592
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    90
    #21
    Ok sure now I understand - sorry it did take me a while :p
    Yeah so if I knew how to code in php it would be good to do php pages making them dynamic as I build them. But as I am only going to be using "snipets" of code as you say it is wiser to just do html in dreamweaver as I have been doing and then modify the htaccess if needed.

    Many thanks for clearing it up for me this will save the effort of renaming those html files :)
     
    JasMate, Jul 27, 2006 IP
  2. Superorb

    Superorb Peon

    Messages:
    149
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #22
    I'm not a big fan of dreamweaver. We use it at work but I usually hand code things in a glorified notepad:) There are many free, well-written tutorials on php that can be found online that have helped me out. Just google them :)
     
    Superorb, Jul 28, 2006 IP
  3. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #23
    And the opposite side: using html extensions that are actually parsed as php leads people to think your site is static when it is (or could be) dynamic. Plus, you end up using the server's resources that way too.

    Unless you are running a site with a huge number of users, using the php extension for all of the files is fine. In fact, I'd probably recommend it. That way, you can start to learn basic php and integrate it with your pages. If you are building a new site, I don't see any significant disadvantage to saving all the files as .php. If you are changing an existing site, the big difference would be with how your site has been indexed (blah.html is different from blah.php). I wouldn't make the .htaccess changes to force all the html files to be parsed though. I'd use .htaccess redirects instead while updating all of your links, sitemap, etc. But that choice is up to you.
     
    Gordaen, Jul 28, 2006 IP
  4. JasMate

    JasMate Active Member

    Messages:
    2,592
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    90
    #24
    :mad: for some reason I am getting "Internal Server Error" when adding this line of text to the .htaccess file: AddType application/x-httpd-php .html .php .htm

    What could I be doing wrong:confused:
     
    JasMate, Jul 28, 2006 IP
  5. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #25
    Use this instead:
    
    
    AddHandler application/x-httpd-php .html .php .htm
    Code (markup):
    if you continue getting the error then is your hosting provider :rolleyes:

    In example, this handler is disabled if your site is hosted on NetFirms.
     
    Mystique, Jul 28, 2006 IP
  6. JasMate

    JasMate Active Member

    Messages:
    2,592
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    90
    #26
    Cool & thanks a AddHandler works a treat :D
     
    JasMate, Jul 28, 2006 IP
  7. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #27
    No problem, and good luck learning php :)
     
    Mystique, Jul 29, 2006 IP