HTML, Iframes with PHP?
I know of the include() code, but I want the iframes to change. In HTML it would be something like
<A href="mickeymouse.html" target="NAME_OF_THE_IFRAME">Mickey</A>
How can I do the same in PHP?
Also for static HTML is it better to use inc开发者_如何转开发lude() or get_content()? What do you usually use?
What I'm trying to do is a more SEO-friendly and simpler website.
You have to rename you file from html to php, and then change your line for the following one
<? $myIframeURL = "whateveryouwant" ?> //Here you can define the url you want to load
<A href="mickeymouse.html" target="<?= $myIframeURL ?>">Mickey</A>
<?php
$varri = "http://stackoverflow.com/questions/5416527/html-iframes-with-php";
?>
<iframe src=<?php print $varri; ?> scrolling="auto" width=100% height=100% frameborder="0"> </iframe>
精彩评论