??How i can insert php into html file ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • silver211
    Confirmed User
    • Jan 2005
    • 197

    #1

    ??How i can insert php into html file ?

    ??How i can insert php into html file ?
  • Jay_StandAhead
    Confirmed User
    • Jul 2002
    • 3103

    #2
    just insert it with the php tags and set your server to parse html files

    Our Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks
    Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites

    Comment

    • mardigras
      Bon temps!
      • Feb 2003
      • 14194

      #3
      You could also put the php code on it's own page and embed it into the HTML page with an iFrame.
      .

      Comment

      • silver211
        Confirmed User
        • Jan 2005
        • 197

        #4
        .shtml ^

        I have server-parsed extension setting on my server.. It should work with this.. .shtml So i just rename my file.. for file.shtml..

        Comment

        • silver211
          Confirmed User
          • Jan 2005
          • 197

          #5
          Not working..

          Hello

          I tried to use .shtml extension and add a php tags into my html. and it still dont work ..? ? So any idea for resolve the problem ?

          thank you

          Comment

          • Paul Waters
            Confirmed User
            • Mar 2003
            • 4402

            #6
            Is PHP enabled on your server?

            Do a simple Hello World file, and get it working first.


            Paul

            Comment

            • silver211
              Confirmed User
              • Jan 2005
              • 197

              #7
              Php is installed on my server

              Php is installed on my server .......

              Comment

              • calmlikeabomb
                Confirmed User
                • May 2004
                • 1323

                #8
                Edit: Just rename your html files to .php extension and do something like this:

                Code:
                <html>
                <head>
                <title>Untitled Document</title>
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                </head>
                <body>
                <?php echo 'Sup Hoe' ?>
                </body>
                </html>
                Last edited by calmlikeabomb; 01-11-2005, 05:11 PM.
                subarus.

                Comment

                • Paul Waters
                  Confirmed User
                  • Mar 2003
                  • 4402

                  #9
                  Originally posted by silver211
                  Php is installed on my server .......
                  Installed. That is a start.

                  Is Apache configured to use it?


                  Paul

                  Comment

                  • silver211
                    Confirmed User
                    • Jan 2005
                    • 197

                    #10
                    Originally posted by calmlikeabomb
                    Edit: Just rename your html files to .php extension and do something like this:

                    Code:
                    <html>
                    <head>
                    <title>Untitled Document</title>
                    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                    </head>
                    <body>
                    <?php echo 'Sup Hoe' ?>
                    </body>
                    </html>

                    http://www.hotgirl21.com/test.html

                    Nothing appear

                    Comment

                    • silver211
                      Confirmed User
                      • Jan 2005
                      • 197

                      #11
                      http://www.hotgirl21.com/test.php.. Work.

                      Comment

                      • directfiesta
                        Too lazy to set a custom title
                        • Oct 2002
                        • 30135

                        #12
                        Before running, start walking....

                        make a file with notepad :

                        <?php phpinfo(); ?>

                        that you will call phpinfo.php

                        upload to server in your directory where you index.html is


                        and call:

                        http://www.mydomain.com/phpinfo.php

                        If this give you your config ( or not) come back here.
                        I know that Asspimple is stoopid ... As he says, it is a FACT !

                        But I can't figure out how he can breathe or type , at the same time ....

                        Comment

                        • Rantan
                          Confirmed User
                          • Aug 2004
                          • 714

                          #13
                          it depends on several things...
                          is php installed?
                          is your HTTP server config to use it?
                          what extension (.html, .php, .php4 ect...) does your http server read php with?

                          if you've got all that crap set..and you got the php syntax right..it'll work...
                          www.jesusjohnson.com

                          Comment

                          • directfiesta
                            Too lazy to set a custom title
                            • Oct 2002
                            • 30135

                            #14
                            1. Rename yourpage.htm -> yourpage.php
                            2. Insert this code where you want otherpage.php

                            <?php include("otherpage.php"); ?>
                            Last edited by directfiesta; 01-11-2005, 05:28 PM.
                            I know that Asspimple is stoopid ... As he says, it is a FACT !

                            But I can't figure out how he can breathe or type , at the same time ....

                            Comment

                            • calmlikeabomb
                              Confirmed User
                              • May 2004
                              • 1323

                              #15
                              Originally posted by silver211
                              Don't know what to tell ya man:

                              http://www.penis-enlargement-product.us/help.php
                              subarus.

                              Comment

                              • silver211
                                Confirmed User
                                • Jan 2005
                                • 197

                                #16
                                When i created a test.php is work.. but it's not work with my main page.
                                you can see below what the code is insert in my page .. (Phpinfo .. work.)

                                </table>
                                <br />
                                <?php
                                if (@include(getenv('DOCUMENT_ROOT').'/phpAdsNew-2.0/phpadsnew.inc.php')) {
                                if (!isset($phpAds_context)) $phpAds_context = array();
                                $phpAds_raw = view_raw ('zone:1', 0, '_blank', '', '1', $phpAds_context);
                                $phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw['bannerid']);
                                echo $phpAds_raw['html'];
                                }
                                ?>

                                <div align="center">

                                Comment

                                • silver211
                                  Confirmed User
                                  • Jan 2005
                                  • 197

                                  #17
                                  permission ? maybe is just the problem ? for phpadsnew banner ? what is required permission ?

                                  Comment

                                  • directfiesta
                                    Too lazy to set a custom title
                                    • Oct 2002
                                    • 30135

                                    #18
                                    Originally posted by silver211
                                    When i created a test.php is work.. but it's not work with my main page.
                                    you can see below what the code is insert in my page .. (Phpinfo .. work.)

                                    </table>
                                    <br />
                                    <?php
                                    if (@include(getenv('DOCUMENT_ROOT').'/phpAdsNew-2.0/phpadsnew.inc.php')) {
                                    if (!isset($phpAds_context)) $phpAds_context = array();
                                    $phpAds_raw = view_raw ('zone:1', 0, '_blank', '', '1', $phpAds_context);
                                    $phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw['bannerid']);
                                    echo $phpAds_raw['html'];
                                    }
                                    ?>

                                    <div align="center">
                                    Keep it simple....

                                    Make a page where you will put your phpadnews script.

                                    Call it phpadnews.php

                                    Check if it works and banners rotate.

                                    If so, the use the :

                                    <?php include("phpadnews.php"); ?>

                                    where you want the banners to show in your main page. Change your mainpage extension to php, otherwise it will not work.

                                    You could even include this in a header that then could be included in all your pages



                                    OR:

                                    in a .htaccess file, add:

                                    AddType application/x-httpd-php .html
                                    I know that Asspimple is stoopid ... As he says, it is a FACT !

                                    But I can't figure out how he can breathe or type , at the same time ....

                                    Comment

                                    • directfiesta
                                      Too lazy to set a custom title
                                      • Oct 2002
                                      • 30135

                                      #19
                                      Originally posted by silver211
                                      permission ? maybe is just the problem ? for phpadsnew banner ? what is required permission ?
                                      Chmod all files and subfolders to 777 ( pf phpadnews). If it works, then you can be more restrictive on your permissions of certain folders...
                                      I know that Asspimple is stoopid ... As he says, it is a FACT !

                                      But I can't figure out how he can breathe or type , at the same time ....

                                      Comment

                                      • silver211
                                        Confirmed User
                                        • Jan 2005
                                        • 197

                                        #20
                                        Phpadsnew

                                        Originally posted by directfiesta
                                        Chmod all files and subfolders to 777 ( pf phpadnews). If it works, then you can be more restrictive on your permissions of certain folders...
                                        I use Phpadsnew.. The server seem to be ask for a login when the script try to connect to promo.adrevservice.com ?? So , it possible to stop this ?

                                        thank you

                                        Comment

                                        • silver211
                                          Confirmed User
                                          • Jan 2005
                                          • 197

                                          #21
                                          Url

                                          Check here
                                          http://www.hotgirl21.com/banners/phpadsnew.php

                                          Comment

                                          • Jace
                                            FBOP Class Of 2013
                                            • Jan 2004
                                            • 35562

                                            #22
                                            Originally posted by silver211
                                            that is because the file ends in .html

                                            in order for a page on the web to read php it has to end in .php not .html

                                            Comment

                                            • silver211
                                              Confirmed User
                                              • Jan 2005
                                              • 197

                                              #23
                                              I resolve the problem

                                              Thank you to all for your help .. I resolve the problem.

                                              Comment

                                              Working...