开发者

HTML, Iframes with PHP?

开发者 https://www.devze.com 2023-02-19 23:47 出处:网络
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>

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消