mirror of
https://github.com/FranP-code/Visit-counter.git
synced 2025-10-12 23:52:54 +00:00
readme added
This commit is contained in:
68
logic.php
68
logic.php
@@ -1,35 +1,35 @@
|
||||
<?php
|
||||
|
||||
|
||||
if (file_exists('./visits.txt')) {
|
||||
$c = file_get_contents('./visits.txt');
|
||||
$c++;
|
||||
|
||||
} else {
|
||||
$c = 'Error, el archivo visits.txt no existe';
|
||||
}
|
||||
|
||||
$tooBig = false;
|
||||
$allRight = '<h2 class="amount">' . $c . '</h2>';
|
||||
$alert = '<h2 class="alert">!!!</h2>';
|
||||
|
||||
if ($c > 9999) {
|
||||
$tooBig = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function actualizeNumber($c) {
|
||||
|
||||
if (file_exists('./visits.txt')) {
|
||||
file_put_contents('./visits.txt', $c);
|
||||
}
|
||||
}
|
||||
|
||||
function checkNumber($c) {
|
||||
require './messages_and_variables.php';
|
||||
|
||||
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
if (file_exists('./visits.txt')) {
|
||||
$c = file_get_contents('./visits.txt');
|
||||
$c++;
|
||||
|
||||
} else {
|
||||
$c = 'Error, el archivo visits.txt no existe';
|
||||
}
|
||||
|
||||
$tooBig = false;
|
||||
$allRight = '<h2 class="amount">' . $c . '</h2>';
|
||||
$alert = '<h2 class="alert">!!!</h2>';
|
||||
|
||||
if ($c > 9999) {
|
||||
$tooBig = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function actualizeNumber($c) {
|
||||
|
||||
if (file_exists('./visits.txt')) {
|
||||
file_put_contents('./visits.txt', $c);
|
||||
}
|
||||
}
|
||||
|
||||
function checkNumber($c) {
|
||||
require './messages_and_variables.php';
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user