aulinha›

This commit is contained in:
111111111111111111111111111 EMAIL
2025-10-02 20:01:35 -03:00
commit bf0d0595ed
18 changed files with 1391 additions and 0 deletions

35
aula14.php Normal file
View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="estilo.css">
<title>Aula 14</title>
</head>
<body>
<header><h1>Aula 14 - Grava texto</h1></header>
<main>
<?php
$arquivo = "visita.txt";
if(@$fp = fopen($arquivo,"r")){
$contents = fread($fp,filesize($arquivo));
fclose($fp);
}
$texto = $contents + 1;
echo"<h3 class='verd'>Você é o visitante n° $texto </h3>";
$arquivo = "visita.txt";
$fp = fopen($arquivo, "w");
fwrite($fp, $texto);
fclose($fp);
?>
</main>
</body>
</html>