e encontrado un sistema de comentarios que funciona al 100%
http://www.megaupload.com/?d=16SN2AEO
son 5 archivos que debeis subir al servidor.
El index lo podeis pegar en el index de vuestra web, pero debe ser .php
no es necesario tener base de datos ya que los comentarios se almacenan en datos.txt
ACTUALIZACION:
e hecho todo en un solo archivo PHP, aunque tambien necesitareis los archivos datos.txt vacio y contador.txt con un 0
aqui el codigo:
Lo podeis ver utilizado aqui:Código:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Documento sin título</title> </head> <?php if(isset($_POST['nombre'],$_POST['apellidos'])){ $archivo = fopen("datos.txt","a+"); $cadena = "Nombre: ".$_POST['nombre'].".\r\nComentarios: ".$_POST['apellidos'].".\r\n\r\n"; fwrite($archivo,$cadena); ?> <?php $archi = 'contador.txt'; $auxi = fopen($archi, 'rb'); $Visitas = fgets($auxi, 10); $Visitas++; fclose($auxi); $auxi = fopen($archi, 'wb'); fwrite($auxi, $Visitas); fclose($auxi); } ?> <body> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Comentarios</title> </head> <body> <p align="left" class="style1">Actualmente hay <?php $path = $HTTP_SERVER_VARS['DOCUMENT_ROOT']; $archivo = file("contador.txt"); $lineas = count($archivo); for($i=0; $i < $lineas; $i++){ echo $archivo[$i]." "; }?>Comentarios:</p> </body> </html> <table width="250" border="0" align="justify"> <tr> <th scope="col"><?php $path = $HTTP_SERVER_VARS['DOCUMENT_ROOT']; $archivo = file("datos.txt"); $lineas = count($archivo); for($i=0; $i < $lineas; $i++){ echo $archivo[$i]." "; } ?> </th> </tr> </table> <form action="#" method="post" class="style2"> <table width="250" border="0"> <tr> <th scope="col">Ingresa tu Nick/Nombre</th> </tr> <tr> <th scope="col"><input name="nombre" type="text" /></th> </tr> <tr> <th scope="row">Ingresa Tu Comentario</th> </tr> <tr> <th scope="row"><textarea name="apellidos"></textarea> </th> </tr> </table> <input type="submit" value="Enviar" name="enviar" /> </form> </span> </body> </html>
http://josesd.22web.net/cctw/examples



Citar



Marcadores