<?php
$archivo = "contador.txt";
$abrirarchivo = fopen($archivo, "r");
$total = fread($abrirarchivo, filesize($archivo));
fclose($abrirarchivo);
$abrirarchivo = fopen($archivo, "w");
$savenuevo = fwrite($abrirarchivo, $total);
$total[0] = $total[0] + 1;
//Prueba
$total[1] = 100
$total[2] = > 100
$destino =
[email protected]
$asunto = Contador web
$mensaje = La pagina web ha recibido ".$total." visitas .
if ($total[0] == $total[1]) {
mail ($destino, $asunto, $mensaje) ;
}
else ( $total[2]) {
fclose($abrirarchivo);
}
fclose($abrirarchivo);
?>
Esta mal la parte de //Prueba
Gracias