Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 16-08-2005, 03:28 PM
Novice Webmaster
 
Join Date: Aug 2005
Location: South America
Posts: 58
Rep Power: 42
sloth is on a distinguished road
insert php in html

hello guys...

how to insert php code in our page?

juz to make it staticly dynamic..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 17-08-2005, 12:28 PM
Jacky's Avatar
Novice Webmaster
 
Join Date: Jul 2005
Location: KL
Posts: 68
Rep Power: 43
Jacky is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 18-08-2005, 04:08 PM
marco's Avatar
Novice Webmaster
 
Join Date: Sep 2004
Location: Shah Alam
Posts: 43
Rep Power: 0
marco is on a distinguished road
Send a message via MSN to marco Send a message via Yahoo to marco
Quote:
how to insert php code in our page?
Your question.. is not clear enough.. can u explain more?
__________________
regards,

Blog : The Living Earendur
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 24-08-2005, 03:51 PM
ustazmalaya's Avatar
Inspired Webmaster
 
Join Date: Oct 2001
Location: Kajang
Posts: 121
Rep Power: 89
ustazmalaya is on a distinguished road
Send a message via Yahoo to ustazmalaya
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 25-08-2005, 07:20 PM
Novice Webmaster
 
Join Date: Aug 2005
Location: South America
Posts: 58
Rep Power: 42
sloth is on a distinguished road
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 25-08-2005, 11:36 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
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!.
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 26-08-2005, 05:37 PM
<gempaq>'s Avatar
Novice Webmaster
 
Join Date: Oct 2002
Location: taiping
Posts: 88
Rep Power: 76
<gempaq> is on a distinguished road
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]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 26-08-2005, 07:34 PM
Novice Webmaster
 
Join Date: Aug 2005
Location: South America
Posts: 58
Rep Power: 42
sloth is on a distinguished road
wohhh... okeh.. thank you 4 helping...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
insert data into multiple table azmaliya Website Programming 18 06-08-2005 11:02 AM
XML : macam mana nak insert new record? therion Website Design 21 23-04-2005 09:20 AM
insert multiple data vash Website Programming 4 28-04-2004 02:48 PM
mcm mane nak insert array dalm database kasih Website Programming 7 24-09-2002 12:07 PM
kalau insert or delete lak camner adique_7 Website Programming 2 03-05-2002 12:28 AM


All times are GMT +8. The time now is 01:44 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

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