PHP Fehler
= Es geht um folgenden Fehler, wenn ich ein Bild lösche.
=
= www.image-load.net/pic.php
=
= Alles wird bei mir über eine pic.php gesteuert.
=
= Da müssten am Anfang ein paar Zeilen rein.
=
=
= <?php
= require("config.inc.php");
=
= $imgname = $_GET['f'];
= $type = $_GET['type'];
=
= $groesse = getimagesize("./uploads/".$imgname.".".$type);
= $width = $groesse[0];
= $height = $groesse[1];
=
= if($_GET['type'] == 'gif')
= {
= if (file_exists("./uploads/".$imgname.".gif"))
= {
= Header("Content-type: image/gif");
= $im = imagecreatefromgif("./uploads/".$imgname.".gif");
= ImageGif($im);
= ImageDestroy($im);
= }
= else
= {
= Header("location: ".$domain);
= exit();
= }
= }
= elseif($_GET['type'] == 'jpeg')
= {
= if (file_exists("./uploads/".$imgname.".jpeg"))
= {
= Header("Content-type: image/jpeg");
= $im = imagecreatefromjpeg("./uploads/".$imgname.".jpeg");
= Imagejpeg($im);
= ImageDestroy($im);
= }
= else
= {
= Header("location: ".$domain);
= exit();
= }
= }
= elseif($_GET['type'] == 'jpg')
= {
= if (file_exists("./uploads/".$imgname.".jpg"))
= {
= Header("Content-type: image/jpeg");
= $im = imagecreatefromjpeg("./uploads/".$imgname.".jpg");
= Imagejpeg($im);
= ImageDestroy($im);
= }
= else
= {
= Header("location: ".$domain);
= exit();
= }
= }
= elseif($_GET['type'] == 'png')
= {
= if (file_exists("./uploads/".$imgname.".png"))
= {
= Header("Content-type: image/png");
= $im = imagecreatefrompng("./uploads/".$imgname.".png");
= Imagepng($im);
= ImageDestroy($im);
= }
= else
= {
= Header("location: ".$domain);
= exit();
= }
= }
= else
= {
= Header("location: ".$domain);
= exit();
= }
= ?>
=
=
= Wäre super, wenn ihr da eine Lösung wüsstet.
Liebe Grüße
Philipp
Beitrag erstellen
EinloggenKostenlos registrieren