Download limit ändern
Hallo Leute,
kann mir bitte irgendjemand helfen?
Mein Problem ist , dass ich nur bis 52 KB uploaden kann, sollte aber wesentlich mehr sein ca. bis 500 KB. Und ich kann es nicht in den Griff bekommen.
Meine Code sieht so aus:
<?php
function foto_einlegen($pfad_help, $foto_help, $foto_help_name, $objekt_nr_help, $nu){
GLOBAL $new_foto_name, $f;//, $_FILES, $foto_help;
//print $_FILES['foto_help']['size'];
if(move_uploaded_file($foto_help, "$pfad_help/$foto_help_name")){
if(ereg("jpg",$foto_help_name)||ereg("JPG",$foto_help_name)||ereg("jpe g",$foto_help_name)||ereg("JPEG",$foto_help_name)||ereg("jpe",$foto_he lp_name)||ereg("JPE",$foto_help_name))
$new_foto_name[$nu]=$objekt_nr_help."_".$nu.".jpg";
if(ereg("png",$foto_help_name)||ereg("PNG",$foto_help_name))
$new_foto_name[$nu]=$objekt_nr_help."_".$nu.".png";
if(rename ("$pfad_help/$foto_help_name", "$pfad_help/$new_foto_name[$nu]"))
$f[$nu]=1;
else
$f[$nu]=0;
}
if($f[$nu]){
foto_einlegen_h($pfad_help, $foto_help_name, $new_foto_name[$nu], "$nu");
}
}
function foto_einlegen_h($pfad_help_help, $foto_help_name, $new_fo ,$nu_h){
GLOBAL $pfad_100, $pfad_180, $pfad_600, $pfad;
$bild=getimagesize("$pfad_help_help/$new_fo");
$breite=$bild[0];
$hoehe=$bild[1];
$neueBreite=100;
$neueHoehe=intval($hoehe*$neueBreite/$breite);;
$breite=$bild[0];
$hoehe=$bild[1];
if(ereg("jpg",$foto_help_name)||ereg("JPG",$foto_help_name)||ereg("jpe g",$foto_help_name)||ereg("JPEG",$foto_help_name)||ereg("jpe",$foto_he lp_name)||ereg("JPE",$foto_help_name)){
# JPG
$altesBild=ImageCreateFromJPEG("$pfad_help_help/$new_fo");
$neuesBild=ImageCreateTrueColor($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe, $breite,$hoehe);
ImageJPEG($neuesBild,"$pfad_100/$new_fo", 75);
}
if(ereg(".png",$foto_help_name)||ereg(".PNG",$foto_help_name)){
$altesBild=ImageCreateFromPNG("$pfad_help_help/$new_fo");
$neuesBild=ImageCreateTrueColor($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe, $breite,$hoehe);
ImagePNG($neuesBild,"$pfad_100/$new_fo");
}
$bild=getimagesize("$pfad_help_help/$new_fo");
$breite=$bild[0];
$hoehe=$bild[1];
$neueBreite=180;
$neueHoehe=intval($hoehe*$neueBreite/$breite);;
$breite=$bild[0];
$hoehe=$bild[1];
if(ereg("jpg",$foto_help_name)||ereg("JPG",$foto_help_name)){
# JPG
$altesBild=ImageCreateFromJPEG("$pfad_help_help/$new_fo");
$neuesBild=ImageCreateTrueColor($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe, $breite,$hoehe);
ImageJPEG($neuesBild,"$pfad_180/$new_fo", 75);
}
if(ereg(".png",$foto_help_name)||ereg(".PNG",$foto_help_name)){
$altesBild=ImageCreateFromPNG("$pfad_help_help/$new_fo");
$neuesBild=ImageCreateTrueColor($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe, $breite,$hoehe);
ImagePNG($neuesBild,"$pfad_180/$new_fo");
}
$bild=getimagesize("$pfad_help_help/$new_fo");
$breite=$bild[0];
$hoehe=$bild[1];
$neueBreite=600;
$neueHoehe=intval($hoehe*$neueBreite/$breite);;
$breite=$bild[0];
$hoehe=$bild[1];
if(ereg("jpg",$foto_help_name)||ereg("JPG",$foto_help_name)){
# JPG
$altesBild=ImageCreateFromJPEG("$pfad_help_help/$new_fo");
$neuesBild=ImageCreateTrueColor($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe, $breite,$hoehe);
ImageJPEG($neuesBild,"$pfad_600/$new_fo", 75);
}
if(ereg(".png",$foto_help_name)||ereg(".PNG",$foto_help_name)){
$altesBild=ImageCreateFromPNG("$pfad_help_help/$new_fo");
$neuesBild=ImageCreateTrueColor($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe, $breite,$hoehe);
ImagePNG($neuesBild,"$pfad_600/$new_fo");
}
unlink("$pfad/$new_fo");
}
?>
<form enctype="multipart/form-data" action="<?= $PHP_SELF."?objekt_nr=".$objekt_nr; ?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
<input type="file" name="foto_1">
<input type="submit" value="hochladen">
</form></td>
Was ist Falsch, oder besser gesagt, wie kann ich die Download limit vergrossern?
Bin für jeden Rat dankbar.
Grüße,
Alex.
|