Moin, sitze an NetBeans und schreibe einen einfachen Spielautomaten. Nun möchte ich gern ein graues Bild als Hintergrund setzen, allerdings lässt sich die jpg datei nie finden, egal welchen Pfad ich angebe. Mach ich irgendetwas falsch? Danke im Voraus
PHP
<!DOCTYPE html>
-->
<html>
<head>
<meta charset="UTF-8">
<title>Zufallsgenerator</title>
</head>
<style>body {
background-image: url("C:\Users\Damien\Desktop\Hintergrund.png");
}
</style>
<body style="text-align: center;">
<h1 style="font-size:40px;">Slot Machine</h1>
<h2 style="color:#000000;text-shadow:#ff0000 1px 1px 4px;text-align:center;"><span style="color:#000000;">Press F5 to try again!</span></h2>
<h5 style="font-size: 50px;">
<?php
$kette = array(
"❤ ",
"☠ ", "☁ ",
"☉ ", "☎ ",
"☑ ", "☓ ",
"☗ ", "☢ ",
"☪ ", "☯ ",
"☰ ", "☻ ",
"♉ ", "♛ ",
"♦ ", "♬ "
);
$code = "";
$countkette = count($kette);
for ($i = 0; $i < 5; $i++) {
$zufall = rand(0, ($countkette - 1));
$code .= $kette[$zufall];
}
echo $code
?>
</h5>
</body>
</html>
Alles anzeigen