hi, ich habe folgendes script programmiert:
Nun gibts mir folgende meldung aus:
Warning: imagejpeg(): Unable to access /home/www/web124/html/unibuxx/gfx/ppics/9.jpg in /home/www/web124/html/unibuxx/profilbild.php on line 87
Warning: imagejpeg(): Invalid filename '/home/www/web124/html/unibuxx/gfx/ppics/9.jpg' in /home/www/web124/html/unibuxx/profilbild.php on line 87
die rechte stimmen und der uploadpfad auch.....
PHP-Code:
<?php
if($action == "del")
{
mysql_query("UPDATE as_members SET ppic = '0' WHERE id = '".$_SESSION["ID"]."'");
unlink("gfx/ppics/".$_SESSION["ID"].".gif");
$_SESSION["PPIC"] = 0;
}
if($action == "upload")
{
$UPLOAD = "/home/www/web124/html/unibuxx/gfx/ppics/".$_SESSION["ID"].".jpg";
if(file_exists($UPLOAD))
@unlink($UPLOAD);
if($_FILES['FILE']['type'] != "image/jpeg"
AND $_FILES['FILE']['type'] != "image/pjpeg"
AND $_FILES['FILE']['type'] != "image/x-png"
AND $_FILES['FILE']['type'] != "image/gif")
$INFO_MSG = "Öhm... Das Vorschaubild-Format ist Asbach-Uralt, oder wie?! *g";
else
{
$SIZE = GetImageSize($_FILES['FILE']['tmp_name']);
if($_FILES['FILE']['type'] == "image/jpeg" OR $_FILES['FILE']['type'] == "image/pjpeg")
$IMAGE = @ImageCreateFromJPEG($_FILES['FILE']['tmp_name']);
else if($_FILES['FILE']['type'] == "image/x-png")
$IMAGE = @ImageCreateFromPNG($_FILES['FILE']['tmp_name']);
else if($_FILES['FILE']['type'] == "image/gif")
$IMAGE = @ImageCreateFromGIF($_FILES['FILE']['tmp_name']);
if($SIZE[0] >= $SIZE[1] AND $SIZE[0] >= 100)
{
$SAVE_X = 100;
$SAVE_Y = ($SIZE[1]*$SAVE_X)/$SIZE[0];
}
else if($SIZE[1] >= $SIZE[0] AND $SIZE[1] >= 100)
{
$SAVE_Y = 100;
$SAVE_X = ($SIZE[0]*$SAVE_Y)/$SIZE[1];
}
else
{
$SAVE_X = $SIZE[0];
$SAVE_Y = $SIZE[1];
}
mysql_query("UPDATE as_members SET ppic = '1' WHERE id = '".$_SESSION["ID"]."'");
$SAVE_IMAGE = @imagecreatetruecolor($SAVE_X, $SAVE_Y);
@imagecopyresized($SAVE_IMAGE, $IMAGE, 0, 0, 0, 0, $SAVE_X, $SAVE_Y, $SIZE[0], $SIZE[1]);
imagejpeg($SAVE_IMAGE, $UPLOAD, 100);
$_SESSION["PPIC"] = 1;
$INFO_MSG = "Ein Profilbild wurde hochgeladen.";
}
echo $INFO_MSG;
}
if($_SESSION["PPIC"] == 0) $IMAGE = "keinbild.gif";
else $IMAGE = $_SESSION["ID"].".jpg";
?>
<h1><?php echo $CONTENT_TITLE; ?></h1>
<div style="border: #F4900D 1px dashed; text-align:center;background-color: #FAE1C0; padding:10px; margin:2px;">
Dein aktuelles Profilbild:<br /><br />
<img alt="Profilbild von <?php echo $_SESSION["NICK"]; ?>" src="gfx/ppics/<?php echo $IMAGE; ?>" /><br /><br />
<?php if($_SESSION["PPIC"] != "0") { ?>
<form method="post" name="loeschen" action="?seite=profilbild&action=del">
<a style="font-size:10px;" href="javascript:document.loeschen.submit();">Bild löschen!</a>
</form>
<?php } ?>
</div>
<br/>
<?php if($_SESSION["PPIC"] == "0") { ?>
<div class="tab3"><p>Neues Profilbild hochladen:</p></div>
<br/>
<form method="post" name="up" action="?seite=profilbild&action=upload" enctype="multipart/form-data">
<label class="left" for="FILE">Pfad angeben:</label>
<input class="style_input" id="FILE" name="FILE" type="file" />
<br/><br/>
<div style="border: #F4900D 1px dashed; text-align:right;">
<a style="font-size:10px;" href="javascript:document.up.submit();">Hochladen</a>
</div>
</form>
<?php } ?>
Nun gibts mir folgende meldung aus:
Warning: imagejpeg(): Unable to access /home/www/web124/html/unibuxx/gfx/ppics/9.jpg in /home/www/web124/html/unibuxx/profilbild.php on line 87
Warning: imagejpeg(): Invalid filename '/home/www/web124/html/unibuxx/gfx/ppics/9.jpg' in /home/www/web124/html/unibuxx/profilbild.php on line 87
die rechte stimmen und der uploadpfad auch.....
Kommentar