From 2cb45405aca6a52a4aca8fc3f81090f7ed4006f1 Mon Sep 17 00:00:00 2001 From: Ivan Pomykacz Date: Wed, 2 Oct 2024 15:27:28 +0200 Subject: [PATCH] dokonceni ukolu --- .gitignore | 1 + index.php | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..085e8ba --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Thumbs.db diff --git a/index.php b/index.php index 56a8889..6b865f5 100644 --- a/index.php +++ b/index.php @@ -5,7 +5,10 @@ Ahoj světe! - + + "; -$random_index = random_int(0, 2); + $images = [ "earth1.webp", @@ -23,6 +26,8 @@ $images = [ "earth3.jpg", ]; +$random_index = random_int(0, count($images) - 1); + // var_dump($images); $random_image = $images[$random_index]; @@ -31,6 +36,37 @@ $random_image = $images[$random_index]; Earth image + "Olívie, Olivia, Oliver", + 20241003 => "Bohumil", + // ... + 20241016 => "Havel", + // ... +]; + +echo "

Dnes má svátek: " . $name_days[date("Ymd")] . "

"; + +?> + +

Výpis obsahu adresáře

+ +"; +foreach ($files1 as $item) { + echo "
  • $item
  • "; +} +echo ""; + +?> +