Tengo este texto:
Código HTML:
<html> <head> <script type='text/js'> var doc=document.getElementById('uno'); function vacio(){ if (vacio>=numero){ document.getElementById.style.height='vacio'; } } </script> <style type='text/css'> #container{ width:100px; height:100px; } #uno div.abuelo:hover{ background:red; } </style> </head> <body> <div id='container'> <img src='nuevo.jpg' alt='nuevo' /> </div> </body> </html>
Y tengo esta función PHP que hice:
Código PHP:
<?php
$contenido=$HTTP_POST_VARS['comenta'];
$contenido=str_replace("<", "[[", $contenido);
$contenido=str_replace(">", "]]", $contenido);
$contenido=str_replace(">=", "][=", $contenido);
$contenido=str_replace("<=", "[]=", $contenido);
$contenido=str_replace("'", "¡¡", $contenido);
$ar=fopen("convertidor.txt","w") or
die("Problemas en la creacion");
fputs($ar,$contenido);
fclose($ar);
?> Código PHP:
$contenido=str_replace(""", "¡¡", $contenido);
pues toma que he cerrado la indicación, entonces hago lo siguiente:
$contenido=str_replace('"', "¡¡", $contenido);
o si no
$contenido=str_replace("'", "¡¡", $contenido);
Código HTML:
[[html]]
[[head]]
[[script type=\¡¡text/js\¡¡]]
var doc=document.getElementById(\¡¡uno\¡¡);
function vacio(){
if (vacio]]=numero){
document.getElementById.style.height=\¡¡vacio\¡¡;
}
}
[[/script]]
[[style type=\¡¡text/css\¡¡]]
#container{
width:100px;
height:100px;
}
#uno div.abuelo:hover{
background:red;
}
[[/style]]
[[/head]]
[[body]]
[[div id=\¡¡container\¡¡]]
[[img src=\¡¡nuevo.jpg\¡¡ alt=\¡¡nuevo\¡¡ /]]
[[/div]]
[[/body]]
[
[/HTML]
Mi pregunta es ¿Por que sale el "\"? haga lo que haga sale, me podrían sugerir alguna solución?
Gracias y saludos!!

