View Single Post
ישן 03-05-14, 23:34   # 7
dor77
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Jan 2008
הודעות: 1,650

dor77 לא מחובר  

זה הקוד:

PHP קוד:

    $file_exts 
= array("jpg""bmp""jpeg""gif""png");
    @
$upload_exts end(explode("."$_FILES["exe"]["name"]));
    if (((
$_FILES["exe"]["type"] == "application/x-msdownload")
    || (
$_FILES["exe"]["type"] == "image/jpeg")
    || (
$_FILES["exe"]["type"] == "image/png")
    || (
$_FILES["exe"]["type"] == "image/pjpeg"))
    && (
$_FILES["exe"]["size"] < 8000000)
    && 
in_array($upload_exts2$file_exts2))
    {
    if (
$_FILES["exe"]["error"] > 0)
    {
    echo 
"Return Code: " $_FILES["exe"]["error"] . "<br>";
    }
    else
    {
    
//echo "Upload: " . $_FILES["file"]["name"] . "<br>";
    //echo "Type: " . $_FILES["file"]["type"] . "<br>";
    //echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
    //echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";
    // Enter your path to upload file here
    
if (file_exists("exe/" .
    
$_FILES["exe"]["name"]))
    {
    echo 
"<div class='error'>"."(".$_FILES["exe"]["name"].")".
    
" already exists. "."</div>";
    }
    else
    {
    
move_uploaded_file($_FILES["exe"]["tmp_name"],
    
"exe/" $_FILES["exe"]["name"]);
    echo 
"<div class='sucess'>"."Stored in: " .
    
"exe/" $_FILES["exe"]["name"]."</div>";
    }
    }
    }
    else
    {
    echo 
"<div class='error'>Invalid file</div>";
    } 
הוא נותן לי Invalid file.

ותמונה הוא מעלה.
__________________
מתכנת php אמין ומקצועי.
מחירים נוחים!
יצירת קשר: 0544378743
  Reply With Quote