Thema: Suche.....
Einzelnen Beitrag anzeigen
  #17  
Alt 13-11-2002, 19:03
Benutzerbild von Sven
Sven Sven ist offline
Tech-Admin

 
Registriert seit: Dec 2000
Ort: Neuss
Beiträge: 37.842
Sven ist ein C...
OL Nick: xysvenxy
Style: cncboard
Nurmal ein kurzer Schnipsel:
PHP-Code:
<?
//user defined variables
//Absolute path to where images are uploaded. No trailing slash

$abpath1 = "/home/cncboa/newspage/images/"; 
$abpath2 = "imgdir";
$abpath3 = "/pics";
$abpath = $abpath1 $abpath2 $abpath3
$sizelim = "no"; //Do you want size limit, yes or no
$size = "2500000"; //What do you want size limited to be if there is one

//all image types to upload
$cert1 = "image/pjpeg"; //Jpeg type 1
$cert2 = "image/jpeg"; //Jpeg type 2
$cert3 = "image/gif"; //Gif type
$cert4 = "image/ief"; //Ief type
$cert5 = "image/png"; //Png type
$cert6 = "image/tiff"; //Tiff type
$cert7 = "image/bmp"; //Bmp Type
$cert8 = "image/vnd.wap.wbmp"; //Wbmp type
$cert9 = "image/x-cmu-raster"; //Ras type
$cert10 = "image/x-x-portable-anymap"; //Pnm type
$cert11 = "image/x-portable-bitmap"; //Pbm type
$cert12 = "image/x-portable-graymap"; //Pgm type
$cert13 = "image/x-portable-pixmap"; //Ppm type
$cert14 = "image/x-rgb"; //Rgb type
$cert15 = "image/x-xbitmap"; //Xbm type
$cert16 = "image/x-xpixmap"; //Xpm type
$cert17 = "image/x-xwindowdump"; //Xwd type

$log = "";
//Checks if file is an image
if (($img3_type == $cert1) or ($img3_type == $cert2) or
($img3_type == $cert3) or ($img3_type == $cert4) or 
($img3_type == $cert5) or ($img3_type == $cert6) or 
($img3_type == $cert7) or ($img3_type == $cert8) or 
($img3_type == $cert9) or ($img3_type == $cert10) or 
($img3_type == $cert11) or ($img3_type == $cert12) or 
($img3_type == $cert13) or ($img3_type == $cert14) or 
($img3_type == $cert15) or ($img3_type == $cert16) or 
($img3_type == $cert17)) {
@copy($img3, "$abpath/$img3_name") or $log .= "Couldn't copy image 3 to server<br>";
if (file_exists("$abpath/$img3_name")) {
$log .= "File 3 was uploaded<br>";
}
} else {
$log .= "File 3 is not an image<br>";
}
}
}
Vielleicht bekommst du dann eine Vorstellung davon was PHP ist
__________________
Zitat:
Wir sind im Augenblick dabei, zu prüfen, ob es im öffentlichen Interesse liegt, ihnen mitzuteilen, ob wir die Informationen haben, die Sie erbitten, und ob es, sollte das der Fall sein, im öffentlichen Interesse liegt, Ihnen diese Informationen zur Verfügung zu stellen.
Mit Zitat antworten