order deny, allow
deny from allDan wil hij geen plaatjes meer weergeven (ik doe dat met <img src="images/foto_001.jpg">)
Hoe los ik dit op?
order deny, allow
deny from all<?php
ob_start();
if((!$_GET['bestand']) & (!$_GET['type'])) {
echo 'u moet de parameters nog opgeven!!';
exit();
}
$bestand = $_GET['bestand'];
$bestand = fopen($bestand, "r") or exit("Het is niet gelukt dit bestand te openen!");
$inhoud = file_get_contents($bestand);
switch($_GET['type']) {
case "jpeg":
header ("Content-type: image/jpeg");
echo $inhoud;
break;
case "gif":
header ("Content-type: image/gif");
echo $inhoud;
break;
case "jpg":
header ("Content-type: image/jpeg");
echo $inhoud;
break;
case "jpe":
header ("Content-type: image/jpeg");
echo $inhoud;
break;
case "bmp":
header ("Content-type: image/bmp");
echo $inhoud;
break;
case "png":
header ("Content-type: image/png");
echo $inhoud;
break;
case "tif":
header ("Content-type: image/tiff");
echo $inhoud;
break;
case "tiff":
header ("Content-type: image/tiff");
echo $inhoud;
break;
}
?>
<?php
ob_start();
if((!$_GET['bestand']) & (!$_GET['type'])) {
echo 'u moet de parameters nog opgeven!!';
exit();
}
$bestand = $_GET['bestand'];
$inhoud = file_get_contents($bestand);
switch($_GET['type']) {
case "jpeg":
header ("Content-type: image/jpeg");
echo $inhoud;
break;
case "gif":
header ("Content-type: image/gif");
echo $inhoud;
break;
case "jpg":
header ("Content-type: image/jpeg");
echo $inhoud;
break;
case "jpe":
header ("Content-type: image/jpeg");
echo $inhoud;
break;
case "bmp":
header ("Content-type: image/bmp");
echo $inhoud;
break;
case "png":
header ("Content-type: image/png");
echo $inhoud;
break;
case "tif":
header ("Content-type: image/tiff");
echo $inhoud;
break;
case "tiff":
header ("Content-type: image/tiff");
echo $inhoud;
break;
}
?>