delete that file with the unlink functin (i think), then create the same file with other text in it from a form...
EDIT :
I think i solved it, here's the code that worked :
Code: Select all
<?php
$header = "<?php include('header.php'); ?>";
$contenido = "<?php include('header.php'); ?> HOLA HOLA HOLA";
$archivo = "nosotros.php";
fopen($archivo, 'wb');
if (is_writable($archivo)) {
if (!$handle = fopen($archivo, 'a')) {
echo "No se puede abrir el archivo -> ($archivo)";
exit;
}
if (fwrite($handle, $contenido) === FALSE) {
echo "No se puede escribir la fila -> ($archivo)";
exit;
}
echo "Actualizado! se agrego lo siguiente\n ($contenido)";
fclose($handle);
} else {
echo "El archivo $archivo no es de escritura!";
}
?>