\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="

رمز عبور


رمز عبور خود را وارد نمایید

\n"; $password_form.="\n"; $password_form.="\n"; $password_form.="
\n"; $password_form.="\n"; } } // Function to get the extension a file. function get_ext($key) { $key=strtolower(substr(strrchr($key, "."), 1)); // Cause there the same right? $key=str_replace("jpeg","jpg",$key); return $key; } $ext_count=count($allow_types); $i=0; foreach($allow_types AS $extension) { //Gets rid of the last comma for display purpose.. If($i <= $ext_count-2) { $types .="*.".$extension.", "; } Else { $types .="*.".$extension; } $i++; } unset($i,$ext_count); // why not $error=""; $display_message=""; $uploaded==false; // Dont allow post if $password_form has been populated If($_POST['submit']==true AND !$password_form) { For($i=0; $i <= $file_uploads-1; $i++) { If($_FILES['file']['name'][$i]) { $ext=get_ext($_FILES['file']['name'][$i]); $size=$_FILES['file']['size'][$i]; $max_bytes=$max_file_size*1024; // For random names If($random_name){ $file_name[$i]=time()+rand(0,100000).".".$ext; } Else { $file_name[$i]=$_FILES['file']['name'][$i]; } //Check if the file type uploaded is a valid file type. If(!in_array($ext, $allow_types)) { $error.= "فایل ناشناخته ".$_FILES['file']['name'][$i].", شما فقط اجازه آپلود این فایل ها رو دارید ".$types."

"; //Check the size of each file } Elseif($size > $max_bytes) { $error.= " فایل شما ".$_FILES['file']['name'][$i]." بزرگتر از ".$max_file_size." کیلوبایت

"; // Check if the file already exists on the server.. } Elseif(file_exists($folder.$file_name[$i])) { $error.= " فایل ".$_FILES['file']['name'][$i]." نام فایل را تغییر دهید

"; } } // If Files } // For //Tally the size of all the files uploaded, check if it's over the ammount. $total_size=array_sum($_FILES['file']['size']); $max_combined_bytes=$max_combined_size*1024; If($total_size > $max_combined_bytes) { $error.=" حداکثر مقدار مجاز برای فایل ها - در کل ".$max_combined_size." کیلو بایت
"; } // If there was an error take notes here! If($error) { $display_message=$error; } Else { // No errors so lets do some uploading! For($i=0; $i <= $file_uploads-1; $i++) { If($_FILES['file']['name'][$i]) { If(@move_uploaded_file($_FILES['file']['tmp_name'][$i],$folder.$file_name[$i])) { $uploaded=true; } Else { $display_message.=" فایل ها قادر به کپی نیست".$file_name[$i]." ".$folder." حق دسترسی پوشه آپلود را به 777 تغییر دهید \n"; } } } //For } // Else } // $_POST AND !$password_form /* //================================================================================ * Start the form layout //================================================================================ :- Please know what your doing before editing below. Sorry for the stop and start php.. people requested that I use only html for the form.. */ ?> - Powered By اسکریپت.com
فایل های شما آپلود شد

فایل ".$file." : ".$full_url.$file_name[$i]."

\n"); } } ?>
بازگشت



پسوند های قابل پذیرش :




حداکثر حجم در هر فایل : کیلوبایت


حداکثر حجم کل فایل ها : کیلوبایت


انتخاب فایل :