HTML Include code?

Discussion in 'HTML & Website Design' started by Professional Dude, Mar 26, 2008.

  1. #1
    Hi

    Just like you have php code to include files

    <?php include("header.php"); ?>
    Code (markup):
    So, is there any code for html or any kind of javascript, because i dont want to have pages ending with .php


    Share your ideas
    Thanks
     
    Professional Dude, Mar 26, 2008 IP
  2. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You want to include a PHP page in an HTML page?
     
    Dondon2d, Mar 26, 2008 IP
  3. Professional Dude

    Professional Dude Prominent Member

    Messages:
    6,261
    Likes Received:
    430
    Best Answers:
    0
    Trophy Points:
    330
    #3
    yes, is it possible to do that?
     
    Professional Dude, Mar 26, 2008 IP
  4. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Nah, I think not. But you can use mod_rewrite via .htaccess to make .php pages to .html virtually, which means your codes in PHP will still work but what shows in URL is a .html, not sure though :D
     
    Dondon2d, Mar 26, 2008 IP
  5. eSpenders.com

    eSpenders.com Peon

    Messages:
    1,567
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #5
    whats the benefit of a php page showing .html in the url /address bar?
     
    eSpenders.com, Mar 26, 2008 IP
    Professional Dude likes this.
  6. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Uh, I don't know? :D Leet purposes?
     
    Dondon2d, Mar 26, 2008 IP
    Professional Dude likes this.
  7. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #7
    you can embed php includes on html pages by adding the following code to your .htaccess file

    AddType application/x-httpd-php .html
     
    bob25, Mar 26, 2008 IP
    Professional Dude likes this.
  8. Professional Dude

    Professional Dude Prominent Member

    Messages:
    6,261
    Likes Received:
    430
    Best Answers:
    0
    Trophy Points:
    330
    #8
    Thanks but i already figured it out :p
     
    Professional Dude, Mar 27, 2008 IP
  9. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #9
    really not sure what your actual question is.... if you want to remap the html file extension into the PHP framework then others have already answered. If you want to know if you can simply have server side includes in a true HTML file then the answer is yes but the server needs to support sHTML - in the old days it had to have the sHTML file extension but many have remapped them since then.
     
    AstarothSolutions, Mar 27, 2008 IP