Показать сообщение отдельно

  #9  
Старый 29.05.2008, 14:46
baltazar
Banned
Регистрация: 30.03.2007
Сообщений: 344
Провел на форуме:
5149122

Репутация: 2438
Отправить сообщение для baltazar с помощью ICQ
По умолчанию

с картинками там проблема,вот взял и передал сплоит что на милворме,вот что получилось
Код:
$allowed_extensions = array("gif", "jpg", "png", "bmp", "jpe", "jpeg");

[...]

for ($image_i = 1; $image_i < ($images_number+1); $image_i++) {
     $current_image = 'image_'.$image_i;

     $image = $_FILES[$current_image]['tmp_name'];
     $image_name = $_FILES[$current_image]['name'];
     $image_name = str_replace(" ", "_", $image_name);

     $img_name_arr = explode(".",$image_name);
     $type = end($img_name_arr);


     if($image_name == ""){ $img_result .= "<br><font color=red>$current_image -> No File Specified For Upload!</font>"; }
     elseif( !isset($overwrite) and file_exists($config_path_image_upload."/".$image_name)){ $img_result .= "<br><font color=red>$image_name -> Image already exist!</font>";}
     elseif( !(in_array($type, $allowed_extensions) or in_array(strtolower($type), $allowed_extensions)) ){
               $img_result .= "<br><font color=red>$image_name ->This type of file is not allowed !!!</font>";
     }
     else{  //Image is OK, upload it
 
Ответить с цитированием