| Home > Computer & I'net > Including PHP in HTML with ... |
Including PHP in HTML with IFrames | |
This Article will show you how to include a PHP file inside an HTML file seamlessly, using inline floating frames. Iframes are simple floating frames (HTML TAG), which can be placed at any required location on an HTML file. Iframes are said to be faster rendering; use less memory, and are faster at scrolling. They can be stacked over other inline floating frames and can contain transparent content. Iframes have an important attribute called Let us see one example where this technique is applied: This technique is applied in many areas, one example is a news portal, which usually generates a static HTML file as its homepage and other content pages, to save the bandwidth and cope with the heavy load on the site. There is a location where breaking news is updated. Applying the PHP in HTML technique will be very useful, in this case, where the PHP file might dynamically perform a dynamic operation to fetch the dynamic content form a database or other location. Using IFRAMEs we can achieve this type of effect. Let me explain practically how this works out Let us create two files namely:
Source Code for Test.htm
Source Code for Test.php <?phpinfo();?>
Description: Test.htm contains a meta Next we have the Iframe tag containing the attribute: Coming to the Test.php, the PHP script: Put the files in your web server root folder (ie wwwroot folder) Now run the Test.htm, you will be able to see the Test.php loaded inside the Iframe, on the Test.htm You are done now. ----------------- My Articles are dedicated to my father | |
| Articles |
•Auto & Trucks•Business•Computer & I'net·General·Apache·CSS·Database·Hardware·HTML·Javascript&DHTML·Linux·MySQL·Operating System·Perl / CGIPHP·Programming·Publishing·Search Engines·Software Problems·SSI·Tips & Tricks·Utilities·Web Design•Family•Food & Drink•Gardening•Health•Other•Pets•Psychology•Spiritual•Travel•Women |
| Calculators |
|