From d1cc880a25a36f5143f8bfc9c332b186d81bd60d Mon Sep 17 00:00:00 2001 From: Francisco P Date: Sun, 23 May 2021 12:02:17 -0300 Subject: [PATCH] Logica de la pagina web construida --- index.php | 18 ++++++++++++++++-- visits.txt | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 visits.txt diff --git a/index.php b/index.php index 35aab36..3a880cb 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,14 @@ 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; - \ No newline at end of file + + + \ No newline at end of file diff --git a/visits.txt b/visits.txt new file mode 100644 index 0000000..c227083 --- /dev/null +++ b/visits.txt @@ -0,0 +1 @@ +0 \ No newline at end of file