Código fuente del sistema del tablero de mensajes
& ltmeta http-equiv = " Tipo de contenido " Contenido = " text/html; charset=utf-8" />
& lt? Lenguaje de programación del lado del servidor (abreviatura de Preprocesador de hipertexto profesional)
if($ _ REQUEST[' action ']= ' do '){
Extraer ($ _ POST);
p>$r=fopen('post.txt ', ' a+');
$str=iconv('utf-8 ', ' gb2312 ', $T1.' '.$ R1. ' '.$S1. '<br>;);
fwrite($r, $str);
echo '<script& gtlocation . PHP "</script>'
}
if(file_exists(' post . txt '){
$ resultado = explotar(" & lt; br >;, substr(iconv('gb2312 ', 'utf-8 ', file_get_contents('post.txt '), 0, -4));
foreach ($resultado como $valor){
$arr=explode(",$valor);
$ postarr[]= $arr;
}
} p>
& gt
& lt? php if(count($resultado)):? & gt
& lt?php foreach ($postarr como $valor): ?& gt
Nombre:& lt?PHP echo $value[0];? sexo:<?PHP if($value[1])echo 'female';else echo male'?><br> p>
correo electrónico:<?php echo $value[2] ;? & gt& ltbr & gt
Mensaje: & lt? PHP echo $ value[3]; & gt& ltbr & gt /p>
& lthr & gt
& lt? php endforeach? & gt
& lt? & gt
Sin mensaje.
<? php endif? & gt
& ltform método = " post " action = " index . PHP? action = do " & gt
& ltp & gtTu nombre:& ltinput type = " text " nombre = " t 1 "/& gt;& lt/p & gt;
& ltp & gtSexo:
Hombre<input type = " radio " valor = " 0 " nombre = " r 1 "/>
Mujer<input type = " radio " nombre = " r 1 " valor = " 1 "/>& lt/p & gt;
<p>Tu correo electrónico:<input type= "text" name="T2" size="35"/></p>
<p>Su mensaje:& lt/p & gt;
& ltp & gt& lttextarea filas = " 16 " nombre = " s 1 " cols = " 44 " >& lt/textarea & gt; & lt/p & gt;
& ltp & gt& ltinput type = " Enviar " valor = " Enviar " name = " b 1 "/>
& ltinput type = " Reset " value = " Reset " name = " B2 "/& gt;& lt/p & gt;
& lt/formulario & gt;
& lt/cuerpo & gt;
</html>