plaatjes-lezen-uit-directory
Gesponsorde koppelingen
PHP script bestanden
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Get My Image!</title>
<style type="text/css">
body {
background-color: #c0c0c0;
font-family: Verdana, Arial, Helvetica;
font-size: 11px;
color: #000000;
}
</style>
</head>
<body>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//--- kijk of er een naam is meegegeven
if ($_GET['image'])
{
//--- zet $filename
$filename = $_GET['image'];
//--- kijk of $filename bestaat
if (file_exists($filename))
{
//--- pak hoogte en breedte
$size = getimagesize($filename);
echo "<p>";
//--- show image
echo "<img src=\"$filename\" width=\"" . $size['0'] . "\" height=\"" . $size['1'] . "\" alt=\"\" />";
echo "<br /><strong>" . $_GET['image'] . "</strong></p>";
}
else
{
echo "<p>Opgegeven image bestaat niet!</p>";
}
}
else
{
echo "<p>De variabele 'image' is niet meegegeven.</p>";
}
?>
</body>
</html>