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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    http://WapTops.com- Get Real High Traffic
    http://WapFun.info-Fun 4 Wap

    #2
    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, 11:24.

    Comment


      #3
      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.
      <?php unlink('World/Europe/Romania.country'); ?>

      Comment


        #4
        lol simply use
        <?
        Your php code here
        ?>

        ohhh ****tt!
        Free Web Hosting @HostersPoint.com
        php Hosting with Web Builder

        Buy - Sell ADs
        ADMOLA ADs Network
        Monetize Your Site Traffic

        Comment


          #5
          Originally posted by irfiii View Post
          lol simply use
          <?
          Your php code here
          ?>

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

          Comment


            #6
            yes my mistake ! Sorry i read this @topic after posting reply..
            hehehe lol
            Free Web Hosting @HostersPoint.com
            php Hosting with Web Builder

            Buy - Sell ADs
            ADMOLA ADs Network
            Monetize Your Site Traffic

            Comment


              #7
              Originally posted by slowy View Post
              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 [COLOR=#ff0000]pagename[/COLOR].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ノ刀ノイリ!

              Comment


                #8
                Originally posted by metulj View Post
                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 [COLOR=#ff0000]pagename[/COLOR].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

                http://WapTops.com- Get Real High Traffic
                http://WapFun.info-Fun 4 Wap

                Comment


                  #9
                  Originally posted by slowy View Post
                  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ノ刀ノイリ!

                  Comment

                  Working...
                  X