Hallo
Folgendes Problem... Wenn ich ein Bild auswähle sagt er mir das ich kein ausgewählt hätte..
Alles anzeigen
wenn ich ab "Check file size." das davor weglasse kommt die meldung, File zu groß, obwohl es nicht stimmt und wenn ich das bis "Store file" weg lasse meldet er mir "Warning: getimagesize(pics/5d9cb770cbd92d643506113d3b41dfcb) [function.getimagesize]: failed to open stream: No such file or directory in " "unlink(pics/5d9cb770cbd92d643506113d3b41dfcb) [function.unlink]: No such file or directory in" obwohl das directory vorhanden ist...
greets
Folgendes Problem... Wenn ich ein Bild auswähle sagt er mir das ich kein ausgewählt hätte..
Quellcode
- <?PHP
- // Variablen auslesen
- while (list($key,$val)=each($_GET)) {
- ${$key} = $val; }
- include("setup.inc");
- $sizea = 100000;
- $nick3 = "tristar";
- if ($acti == "save") {
- $errortext='';
- IF($photo[error]){
- // No files uploaded
- $errortext= "keine BILD ausgewählt";
- }ELSE{
- // Check file size.
- IF($photo['size']>$session->config->max_photo_size){
- // Uploaded file is too large
- $errortext=STR_REPLACE('{SIZE}', $sitzea, "zu groß");
- }ELSE{
- // Store file
- $tmp_name=MD5($session_id.MICROTIME().RAND(-TIME(), TIME()));
- $tmp_fullname='pics/'.$tmp_name;
- MOVE_UPLOADED_FILE($photo['tmp_name'], $tmp_fullname);
- // Check file mime type
- $type_ok=FALSE;
- $allowed_types=ARRAY('jpg' => '.jpg',
- 'jpeg' => '.jpeg',
- 'gif' => '.gif',
- 'ief' => '.ief',
- 'png' => '.png',
- 'tiff' => '.tiff',
- 'bmp' => '.bmp',
- 'wbmp' => '.wbmp');
- IF(FUNCTION_EXISTS('getimagesize')){
- $imgdata=GETIMAGESIZE($tmp_fullname);
- IF(EMPTY($imgdata) || EMPTY($imgdata['mime'])){
- $imgdata=NULL;
- }
- }ELSE{
- $imgdata=NULL;
- }
- FOREACH($allowed_types AS $chk_type=>$extension){
- IF(!EMPTY($imgdata)){
- $type_ok= !EMPTY($imgdata[0])
- && !EMPTY($imgdata[1])
- && FALSE!==STRPOS(STRTOLOWER($imgdata['mime']), $chk_type);
- }ELSE{
- $type_ok=FALSE!==STRPOS(STRTOLOWER($photo['type']), $chk_type);
- }
- IF($type_ok){
- RENAME($tmp_fullname, $tmp_fullname.$extension);
- $tmp_name.=$extension;
- BREAK;
- }
- }
- IF(!$type_ok){
- // File is not an image or has non-supported format
- $errortext=$lng['notanimage'];
- UNLINK($tmp_fullname);
- }ELSE{
- // Image is OK
- // Update user's profile
- //$user->updateUser($session, $profile_user_id, 'photo = "'.$tmp_name.'"');
- $comment = str_replace("(b)", "<b>", $comment);
- $comment = str_replace("(/b)", "</b>", $comment);
- $comment = str_replace("(i)", "<i>", $comment);
- $comment = str_replace("(/i)", "</i>", $comment);
- $comment = str_replace("[b]", "<b>", $comment);
- $comment = str_replace("[/b]", "</b>", $comment);
- $comment = str_replace("[i]", "<i>", $comment);
- $comment = str_replace("[/i]", "</i>", $comment);
- echo "llll";
- $eintrag = "INSERT INTO icc_galerie (nick, pic, comment, usid) VALUES ('$nick3','$tmp_name' ,'$comment','$usid3')";
- mysql_query($eintrag)or die(mysql_error());
- REQUIRE("see.inc.php");
- BREAK;
- }
- }
- }
- }
- echo $tmp_fullname;
- REQUIRE("upload.tpl.php");
- ?>
wenn ich ab "Check file size." das davor weglasse kommt die meldung, File zu groß, obwohl es nicht stimmt und wenn ich das bis "Store file" weg lasse meldet er mir "Warning: getimagesize(pics/5d9cb770cbd92d643506113d3b41dfcb) [function.getimagesize]: failed to open stream: No such file or directory in " "unlink(pics/5d9cb770cbd92d643506113d3b41dfcb) [function.unlink]: No such file or directory in" obwohl das directory vorhanden ist...
greets