Nieuw lid |
|
Hallo,
ik heb een probleem als ik iets wil uploaden krijg ik een fout.
De fout is
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in /home/white/public_html/kenneth/fotos_toevoegen.php on line 33
Warning: imagecreatefromjpeg(): 'photos/' is not a valid JPEG file in /home/white/public_html/kenneth/fotos_toevoegen.php on line 33
Warning: imagesx(): supplied argument is not a valid Image resource in /home/white/public_html/kenneth/fotos_toevoegen.php on line 34
Warning: imagesy(): supplied argument is not a valid Image resource in /home/white/public_html/kenneth/fotos_toevoegen.php on line 35
Warning: Division by zero in /home/white/public_html/kenneth/fotos_toevoegen.php on line 36
Warning: imagecreatetruecolor(): Invalid image dimensions in /home/white/public_html/kenneth/fotos_toevoegen.php on line 38
Warning: imagecopyresized(): supplied argument is not a valid Image resource in /home/white/public_html/kenneth/fotos_toevoegen.php on line 39
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/white/public_html/kenneth/fotos_toevoegen.php on line 40
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in /home/white/public_html/kenneth/fotos_toevoegen.php on line 33 Warning : imagecreatefromjpeg (): 'photos/' is not a valid JPEG file in /home /white /public_html /kenneth /fotos_toevoegen .php on line 33 Warning: imagesx(): supplied argument is not a valid Image resource in /home/white/public_html/kenneth/fotos_toevoegen.php on line 34 Warning: imagesy(): supplied argument is not a valid Image resource in /home/white/public_html/kenneth/fotos_toevoegen.php on line 35 Warning: Division by zero in /home/white/public_html/kenneth/fotos_toevoegen.php on line 36 Warning: imagecreatetruecolor(): Invalid image dimensions in /home/white/public_html/kenneth/fotos_toevoegen.php on line 38 Warning: imagecopyresized(): supplied argument is not a valid Image resource in /home/white/public_html/kenneth/fotos_toevoegen.php on line 39 Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/white/public_html/kenneth/fotos_toevoegen.php on line 40
ik zal effe men code posten
if($submit){
$img = secure($_GET[img]);
$img2 = $img;
$img = "photos/".$img;
if(is_uploaded_file($_FILES['afbeelding']['tmp_name'])){
$bestandsnaam = $datum.".".$extensie;
copy($_FILES['afbeelding']['tmp_name'], "photos/".$bestandsnaam);
}
function thumbnail($i,$nw,$p,$nn) {
$img=imagecreatefromjpeg("$i");
$ow=imagesx($img);
$oh=imagesy($img);
$scale=$nw/$ow;
$nh=ceil($oh*$scale);
$newimg=imagecreatetruecolor($nw,$nh);
imagecopyresized($newimg,$img,0,0,0,0,$nw,$nh,$ow,$oh);
imagejpeg($newimg, $p.$nn);
return true;
}
if(!file_exists("thumbs/".$img2)){
thumbnail($img,140,"thumbs/",$img2);
}else{}
thumbnail("photos/".$bestandsnaam,140,"thumbs/",$bestandsnaam);
$insert = "INSERT INTO fap_photos (pid, bid, name, bericht, download, img) VALUES ('', '" . $_POST[cat] . "', '" . $_POST[name] . "', '" . $_POST[bericht] . "', '" . $_POST[download] . "', '" . $bestandsnaam . "')";
$query = mysql_query($insert) or die(mysql_error());
tabelbegin("$url", "Succes");
echo "<b>$_COOKIE[gebruikersnaam]</b>.<br>";
echo "Je hebt succesvol je foto toegevoegd.";
tabeleinde();
echo "<br><br>";
exit;
}
if($submit){ $img = secure($_GET[img]); $img2 = $img; $img = "photos/".$img; $bestandsnaam = $datum.".".$extensie; copy($_FILES['afbeelding']['tmp_name'], "photos/".$bestandsnaam); } function thumbnail($i,$nw,$p,$nn) { $img=imagecreatefromjpeg("$i"); $ow=imagesx($img); $oh=imagesy($img); $scale=$nw/$ow; $newimg=imagecreatetruecolor($nw,$nh); imagecopyresized($newimg,$img,0,0,0,0,$nw,$nh,$ow,$oh); imagejpeg($newimg, $p.$nn); return true; } thumbnail($img,140,"thumbs/",$img2); }else{} thumbnail("photos/".$bestandsnaam,140,"thumbs/",$bestandsnaam); $insert = "INSERT INTO fap_photos (pid, bid, name, bericht, download, img) VALUES ('', '" . $_POST[cat] . "', '" . $_POST[name] . "', '" . $_POST[bericht] . "', '" . $_POST[download] . "', '" . $bestandsnaam . "')"; tabelbegin("$url", "Succes"); echo "<b>$_COOKIE[gebruikersnaam]</b>.<br>"; echo "Je hebt succesvol je foto toegevoegd."; tabeleinde(); }
De mappen PHOTOS EN THUMBS EN FOTOS_TOEVOEGEN.PHP hebben een chmod 777
wie kan me helpen ?
|