commit
3d3deab98f
5 changed files with 41 additions and 0 deletions
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 49 KiB |
@ -0,0 +1,5 @@ |
|||||
|
<?php |
||||
|
|
||||
|
echo "<h1>Ahoj světe!</h1>"; |
||||
|
|
||||
|
|
@ -0,0 +1,36 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="cs"> |
||||
|
<head> |
||||
|
<meta charset="UTF-8"> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
|
<title>Ahoj světe!</title> |
||||
|
</head> |
||||
|
<body> |
||||
|
|
||||
|
<?php |
||||
|
// vypsat aktuální datum |
||||
|
// set the default timezone to use. |
||||
|
date_default_timezone_set('Europe/Prague'); |
||||
|
// Prints something like: Monday 8th of August 2005 03:12:46 PM |
||||
|
echo date('Y-m-d H:i:s'); |
||||
|
|
||||
|
echo "<br>"; |
||||
|
$random_index = random_int(0, 2); |
||||
|
|
||||
|
$images = [ |
||||
|
"earth1.webp", |
||||
|
"earth2.jfif", |
||||
|
"earth3.jpg", |
||||
|
]; |
||||
|
|
||||
|
// var_dump($images); |
||||
|
|
||||
|
$random_image = $images[$random_index]; |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
<img src="<?php echo $random_image; ?>" alt="Earth image" width="300"> |
||||
|
|
||||
|
</body> |
||||
|
</html> |
||||
|
|
Loading…
Reference in new issue