Results 1 to 8 of 8

Thread: insert php in html

  1. #1
    Join Date
    Aug 2005
    Location
    South America
    Posts
    58
    Rep Power
    175

    insert php in html

    hello guys...

    how to insert php code in our page?

    juz to make it staticly dynamic..

  2. #2
    Join Date
    Jul 2005
    Location
    KL
    Posts
    68
    Rep Power
    176
    Add a file named .htaccess to your web server. Put the below in it:

    PHP Code:
    AddType application/x-httpd-PHP .ASP .PHP .HTML 
    Now, you can put php codes in your html pages

  3. #3
    Join Date
    Sep 2004
    Location
    Shah Alam
    Posts
    46
    Rep Power
    0
    how to insert php code in our page?
    Your question.. is not clear enough.. can u explain more?
    regards,

    Blog : The Living Earendur

  4. #4
    Join Date
    Oct 2001
    Location
    Kajang
    Posts
    121
    Rep Power
    223
    soalan tambahan

    boleh atau tidak code php masuk file html yang dijalankan kat server yang tiada php (mcm geocities)

    cth: <script type="text/php> bla bla bla...

  5. #5
    Join Date
    Aug 2005
    Location
    South America
    Posts
    58
    Rep Power
    175
    Quote Originally Posted by Jacky
    Add a file named .htaccess to your web server. Put the below in it:

    PHP Code:
    AddType application/x-httpd-PHP .ASP .PHP .HTML 
    Now, you can put php codes in your html pages
    this make all the .HTML page run in php rite? slower the server?




    Quote Originally Posted by marco
    Your question.. is not clear enough.. can u explain more?
    hehe. sorry.. repeat.. how to put php code in html page?.. ok...

  6. #6
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    280
    sertakan contoh senang orang paham lenkali..

    kalau nak masukkan PHP dalam HTML.. tuh mustahil.. masuk mmg bleh.. jalan or tidak tak tahulah..
    tapi masukkan html dalam .php tuh normal..

    TAPI ! Kalau nak jadikan .php sebagai .html tuh dipanggil.... isk lupe plak ako..
    Mod rewrite?
    biasa wordpress guna yang tukarkan dynamic php page dipalsukan sebagai .html
    arr.. MHR pandai bab nih.. script2 dia banyak pakai bebende camnih..

    tapi!.. semuanya dirunkan di server yang support PHP.. iaitu ada apache, ada php..
    geocities? i dont think so!.

  7. #7
    Join Date
    Oct 2002
    Location
    taiping
    Posts
    87
    Rep Power
    210
    Quote Originally Posted by Jacky
    Add a file named .htaccess to your web server. Put the below in it:

    PHP Code:
    AddType application/x-httpd-PHP .ASP .PHP .HTML 
    Now, you can put php codes in your html pages

    ini untuk tarik script php lain guna SSI method. So result dari php akan dipaparkan ke dalam .html sebagai contoh...

    koorang ada forum, dan main page koorang adalah .html format.

    so koorang leh gunakan ssi. sebagai contoh

    PHP Code:
    <html>
    <body><?php require("header.htm"); ?><p>
    Some text
    </p><p>
    Some text
    </p></body>
    </html>


    Kebiasaan script gunakkan tag INCLUDE untuk parse ke format HTML.
    [PHP]
    <html>
    <head>
    <title> Page 1 </title>
    <link rel="stylesheet" type="text/css" href="style.css"/>
    </head>

    <body>
    <?php 
    include ("head.html"); 
    ?> 
    <!-- Table for Main Body -->
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
    <td valign="top" align="left" width="90">
    <?php 
    include ("menu.html");
    ?>
    </td>
    <td width="1" bgcolor="lightskyblue" valign="top">  </td>
    <td valign="top">

    <?php 
    include ("page1body.html"); 
    ?> 
    <br> <br> 
    <?php 
    include ("menu.html");
    ?>
    </td>
    <td width="1" bgcolor="lightskyblue" valign="top">   </td>
    </tr></table>

    </body></html>
    [/PHP]

  8. #8
    Join Date
    Aug 2005
    Location
    South America
    Posts
    58
    Rep Power
    175
    wohhh... okeh.. thank you 4 helping...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. php insert id
    By nur_kasih in forum Website Programming
    Replies: 25
    Last Post: 04-09-2009, 11:10 PM
  2. How to insert song to your site, i use Joomla CMS
    By blackmachine in forum Website Design
    Replies: 2
    Last Post: 14-01-2008, 10:37 AM
  3. XML : macam mana nak insert new record?
    By therion in forum Website Design
    Replies: 21
    Last Post: 23-04-2005, 09:20 AM
  4. insert multiple data
    By vash in forum Website Programming
    Replies: 4
    Last Post: 28-04-2004, 02:48 PM
  5. kalau insert or delete lak camner
    By adique_7 in forum Website Programming
    Replies: 2
    Last Post: 03-05-2002, 12:28 AM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112