mirror of
https://github.com/FranP-code/Visit-counter.git
synced 2025-10-12 23:52:54 +00:00
Logica de la pagina web construida
This commit is contained in:
18
index.php
18
index.php
@@ -2,7 +2,14 @@
|
|||||||
|
|
||||||
require 'logic.php';
|
require 'logic.php';
|
||||||
|
|
||||||
$c = 665;
|
if (file_exists('./visits.txt')) {
|
||||||
|
$c = file_get_contents('./visits.txt');
|
||||||
|
$c++;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$c = 'Error, el archivo visits.txt no existe';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -24,4 +31,11 @@ $c = 665;
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (file_exists('./visits.txt')) {
|
||||||
|
file_put_contents('./visits.txt', $c);
|
||||||
|
}
|
||||||
|
?>
|
||||||
1
visits.txt
Normal file
1
visits.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
Reference in New Issue
Block a user