dies ist ein kleines uploadscript im verzeichniss xy.
als weiteres verzeichniss existiert bilder für den bilder-upload.
erro:0 bedeutet laut aussage "alles okay" - das bild ist selbst unterhalb der grenze und trotzdem kommt der fehler mit dem ich nciht klarkomme...wenn jemand eine idee hätte, wäre ich sehr verbunden...
fehlerausgabe:
name: lady_in_black.gif
size: 86668 bytes
temp name:
type: image/gif
error: 0
Warning: getimagesize(upload/lady_in_black.gif) [function.getimagesize]: failed to open stream: No such file or directory in C:\apachefriends\xampp\htdocs\projekte\ppv\upload. php on line 16
thx4reading
cya
als weiteres verzeichniss existiert bilder für den bilder-upload.
erro:0 bedeutet laut aussage "alles okay" - das bild ist selbst unterhalb der grenze und trotzdem kommt der fehler mit dem ich nciht klarkomme...wenn jemand eine idee hätte, wäre ich sehr verbunden...
fehlerausgabe:
name: lady_in_black.gif
size: 86668 bytes
temp name:
type: image/gif
error: 0
Warning: getimagesize(upload/lady_in_black.gif) [function.getimagesize]: failed to open stream: No such file or directory in C:\apachefriends\xampp\htdocs\projekte\ppv\upload. php on line 16
PHP-Code:
<?php
if ( isset( $_FILES['fupload'] ) ) {
print "name: ". $_FILES['fupload']['name'] ."
";
print "size: ". $_FILES['fupload']['size'] ." bytes
";
print "temp name: ".$_FILES['fupload']['../bilder'] ."
";
print "type: ". $_FILES['fupload']['type'] ."
";
print "error: ". $_FILES['fupload']['error'] ."
";
if ( $_FILES['fupload']['type'] == "image/gif" ) {
$source = $_FILES['fupload']['../bilder'];
$target = "upload/".$_FILES['fupload']['name'];
move_uploaded_file( $source, $target );// or die ("Fehler beim Kopieren");
$size = getImageSize( $target );
$imgstr = "
<img width=\"$size[0]\" height=\"$size[1]\" ";
$imgstr .= "src=%22$target/%22 alt=\"hochgeladenes Bild\" /></p>";
print $imgstr;
}
}
?>
</div>
<form enctype="multipart/form-data"
action="<?php print $_SERVER['PHP_SELF']?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="102400" />
<input type="file" name="fupload" />
<input type="submit" value="Hochladen" />
</p>
</form>
cya


Kommentar