Hallo ,
also der befehlt eregi_replace macht mit mir was ich will ich habe eine Variable nenen wir sie test so die siht etwa so aus
HTML-Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> <!--Sitename-Begin--> <!--Sitename-End--> </title>
<link rel="stylesheet" href="./style/Sekar/css/default.css" type="text/css" >
</head>
<body>
<!--BSP-KAT-Begin-->
<!--<span class="menukat" style="background-image: url(./style/Sekar/img/003.gif);" > @</span> -->
<!--BSP-KAT-End-->
<!--BSP-LINK-Begin-->
<!--<a href="<link>" style="padding-left:5px ;padding-right:5px ;" title="§" > @</a> <br> -->
<!--BSP-LINK-End-->
<!--PotM-Begin-->
<!--<span class="menukat" style="background-image: url(./style/Sekar/img/003.gif);" > </span> <PotM-Script> <span class="menukat" style="background-image: url(./style/Sekar/img/004.gif);" > </span> -->
<!--PotM-End-->
<div style="width:100% ; height:60px ; background-image: url(./style/Sekar/img/001.gif);" class="class1" >
<br>
<script type="text/javascript" >
<!--
//Hier Bitte den Seiten Namen eintragen
//#####################################
var titel = "<!--Sitename-Begin--> <!--Sitename-End--> ";
//#####################################
for(i=0;i<titel.length;i++) {
part = titel.substr(i,1);
part = part.toLowerCase();
if(part != ' ') document.write('<img src="./style/Sekar/img/buchstaben/'+part+'-head.png" alt="'+part+'" /> ');
else document.write(' ');
}
-->
</script>
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0" >
<tr>
<td class="menu" style="text-align:left; font-size:12px ;" >
<!--Menu-Left-Begin-->
<!--Menu-Left-End-->
<br>
</td>
<td style="width:15px;" > </td>
<td class="mitte" >
<!--Contest-Begin-->
<!--Contest-End-->
</td>
<td style="width:15px;" > </td>
<td class="menu" style="text-align:right; font-size:12px ;" >
<!--PotM-Begin-->
<!--PotM-End-->
</td>
</tr>
</table>
<div style="width:100% ; height:60px ; background-image: url(./style/Sekar/img/002.gif);" class="class1" >
<span style="text-align:center; font-size:12px ;" > <br> Made by Dadie<br> 2005</span>
</div>
</body>
</html>
So nun mache ich folgendes
PHP-Code:
$PotM_temp = eregi_replace ( '(.*)<!--PotM-Begin-->' , '' , $test );
echo " $PotM_temp " ;
So nun müsse als ergebniss so aussehn :
HTML-Code:
<!--<span class="menukat" style="background-image: url(./style/Sekar/img/003.gif);" > </span> <PotM-Script> <span class="menukat" style="background-image: url(./style/Sekar/img/004.gif);" > </span> -->
<!--PotM-End-->
<div style="width:100% ; height:60px ; background-image: url(./style/Sekar/img/001.gif);" class="class1" >
<br>
<script type="text/javascript" >
<!--
//Hier Bitte den Seiten Namen eintragen
//#####################################
var titel = "<!--Sitename-Begin--> <!--Sitename-End--> ";
//#####################################
for(i=0;i<titel.length;i++) {
part = titel.substr(i,1);
part = part.toLowerCase();
if(part != ' ') document.write('<img src="./style/Sekar/img/buchstaben/'+part+'-head.png" alt="'+part+'" /> ');
else document.write(' ');
}
-->
</script>
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0" >
<tr>
<td class="menu" style="text-align:left; font-size:12px ;" >
<!--Menu-Left-Begin-->
<!--Menu-Left-End-->
<br>
</td>
<td style="width:15px;" > </td>
<td class="mitte" >
<!--Contest-Begin-->
<!--Contest-End-->
</td>
<td style="width:15px;" > </td>
<td class="menu" style="text-align:right; font-size:12px ;" >
<!--PotM-Begin-->
<!--PotM-End-->
</td>
</tr>
</table>
<div style="width:100% ; height:60px ; background-image: url(./style/Sekar/img/002.gif);" class="class1" >
<span style="text-align:center; font-size:12px ;" > <br> Made by Dadie<br> 2005</span>
</div>
</body>
</html>
Es siht dann aber so aus :
HTML-Code:
<!--PotM-End-->
</td>
</tr>
</table>
<div style="width:100% ; height:60px ; background-image: url(./style/Sekar/img/002.gif);" class="class1" >
<span style="text-align:center; font-size:12px ;" > <br> Made by Dadie<br> 2005</span>
</div>
</body>
</html>
WTF ???? Ömmm. ich bin total verwirrt o_O
Ich hoffe das kann mir mal einer Erklähren .
MFg Dadie