Results 1 to 9 of 9
Like Tree1Likes
  • 1 Post By i0nutzxp

Thread: how to use php code in .html file?????

  1. #1
    Senior Member slowy's Avatar
    Join Date
    Sep 2009
    Location
    Raigarh(c.g.) indian
    Posts
    361
    Thanks
    105
    Thanked 15 Times in 10 Posts
    Rep Power
    4

    Default how to use php code in .html file?????

    i want to use sea html version
    so how to add php codes(smaato or other php ad codes) in .html file
    i tried adding
    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .html .htm
    in .htaccess but its not working

    [Only registered and activated users can see links. Click Here To Register...]- Get Real High Traffic
    [Only registered and activated users can see links. Click Here To Register...]-Fun 4 Wap

  2. #2
    Member iBeyond's Avatar
    Join Date
    Mar 2011
    Location
    Jalpaiguri, INDIA :)
    Posts
    48
    Thanks
    9
    Thanked 26 Times in 5 Posts
    Rep Power
    0

    Default

    rename the .html file to .php
    & use mod rewrite

    or goto Cpanel>> ApacheHandlers & you'll understand what to do.
    Last edited by iBeyond; 08-10-11 at 11:24.

  3. #3
    Senior Member i0nutzxp's Avatar
    Join Date
    Apr 2009
    Location
    Romania , Galati
    Posts
    153
    Thanks
    7
    Thanked 48 Times in 31 Posts
    Rep Power
    5

    Default

    Changing file extension is useless. (it only slow down your site)
    You can use mod rewrite for seo urls : /profile/mcdonald/photos or else is only a waste of time.
    morse likes this.
    <?php unlink('World/Europe/Romania.country'); ?>

  4. #4
    Senior Member irfiii's Avatar
    Join Date
    Mar 2009
    Location
    Punjab/Pakistan
    Posts
    249
    Thanks
    84
    Thanked 37 Times in 12 Posts
    Rep Power
    5

    Default

    lol simply use
    <?
    Your php code here
    ?>

    ohhh ****tt!

  5. #5
    Junior Member
    Join Date
    May 2009
    Location
    India
    Posts
    24
    Thanks
    5
    Thanked 10 Times in 3 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by irfiii [Only registered and activated users can see links. Click Here To Register...]
    lol simply use
    <?
    Your php code here
    ?>

    ohhh ****tt!
    first check yourself this code using extension as .html and then LOL :P

  6. #6
    Senior Member irfiii's Avatar
    Join Date
    Mar 2009
    Location
    Punjab/Pakistan
    Posts
    249
    Thanks
    84
    Thanked 37 Times in 12 Posts
    Rep Power
    5

    Default

    yes my mistake ! Sorry i read this @topic after posting reply..
    hehehe lol

  7. #7
    Super Moderator metulj's Avatar
    Join Date
    Jan 2007
    Location
    your root... now think fast... =]
    Posts
    1,716
    Thanks
    559
    Thanked 213 Times in 131 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by slowy [Only registered and activated users can see links. Click Here To Register...]
    i want to use sea html version
    so how to add php codes(smaato or other php ad codes) in .html file
    i tried adding
    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .html .htm
    in .htaccess but its not working
    it should be
    Code:
    AddType application/x-httpd-php .html
    if you need PHP only on one *.html page,
    then maybe this would be better option
    Code:
    <Files pagename.html>
    AddType application/x-httpd-php .html
    </Files>
    but keep in mind...
    anything in your *.html document that starts
    with <? will be executed as PHP now,
    and btw... avoid short PHP tag like irfiii has posted
    always use
    PHP Code:
    <?php
    echo 'full PHP tag';
    ?>
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

  8. #8
    Senior Member slowy's Avatar
    Join Date
    Sep 2009
    Location
    Raigarh(c.g.) indian
    Posts
    361
    Thanks
    105
    Thanked 15 Times in 10 Posts
    Rep Power
    4

    Default

    Quote Originally Posted by metulj [Only registered and activated users can see links. Click Here To Register...]
    it should be
    Code:
    AddType application/x-httpd-php .html
    if you need PHP only on one *.html page,
    then maybe this would be better option
    Code:
    <Files pagename.html>
    AddType application/x-httpd-php .html
    </Files>
    but keep in mind...
    anything in your *.html document that starts
    with <? will be executed as PHP now,
    and btw... avoid short PHP tag like irfiii has posted
    always use
    PHP Code:
    <?php
    echo 'full PHP tag';
    ?>
    when i try to open file then its saying to save the file instead of opening in browser

    [Only registered and activated users can see links. Click Here To Register...]- Get Real High Traffic
    [Only registered and activated users can see links. Click Here To Register...]-Fun 4 Wap

  9. #9
    Super Moderator metulj's Avatar
    Join Date
    Jan 2007
    Location
    your root... now think fast... =]
    Posts
    1,716
    Thanks
    559
    Thanked 213 Times in 131 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by slowy [Only registered and activated users can see links. Click Here To Register...]
    when i try to open file then its saying to save the file instead of opening in browser
    fix header...
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Html code how to off?
    By arg0s12 in forum Coding Forum
    Replies: 6
    Last Post: 08-12-09, 12:07
  2. [web] Html File Sharing Script
    By thanatos in forum Scripts Forum
    Replies: 1
    Last Post: 22-11-08, 02:01
  3. This Code At Html
    By mary in forum Coding Forum
    Replies: 12
    Last Post: 27-07-08, 13:15
  4. I Need Help To Re-write This Php Wml Code In Html
    By honkytonkman in forum Coding Forum
    Replies: 6
    Last Post: 12-08-07, 15:03
  5. Compiled Html Help File
    By stretch in forum Coding Forum
    Replies: 2
    Last Post: 31-05-07, 19:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19