Lebada Petru
Lebada Petru

Reputation: 37

Can i use iframe for a html file?

Let's say that i have a div with a lot of contents like this:

<div id="g_image4" style=""><img src="images/content1.png" alt="" title=""></div>

<div id="g_text4" style="">
<div class="wpmd1">
<div><font color="#FFFFFF" face="Tahoma" class="ws11"> Cele mai recente </font></div>
<div><font color="#FFFFFF" face="Tahoma" class="ws12"><a href="anime/Basilisk/3.html"  
target="_self" class="style1">Basilisk Ep. 3</a></font></div>
<div><font color="#FFFFFF" face="Tahoma" class="ws12"><a 
href="anime/NarutoShippuden/317.html"  target="_self" class="style1">Naruto Shippuden   
Ep. 317</a></font></div>
</div>
</div>

</div>

This is a div content wich i've insert it in many pages,and i need to update it daily.But it's difficult to edit all pages daily to change names or path or somethings else from this div. So i was though there is another way,a simple one like iframe.But i dont know if it works with html files from the same folder.And if it doesnt work,then is there any other way to do this without editing like 500 pages daily?

Upvotes: 0

Views: 88

Answers (1)

h4ck3r
h4ck3r

Reputation: 207

You can add it using php. Create a php file named something like div.php and put your code in that. Then use the following on each page:

<?php include 'div.php'; ?>

Using this when you update "div.php" every page you put the php includes on will be updated.

Here is a link to help you W3schools PHP includes

Upvotes: 1

Related Questions