ABA


"בעיה בהעלאת קבצים לאתר :)"
גירסת הדפסה        
קבוצות דיון בניית אתרים נושא #11315 מנהל    סגן המנהל    מפקח   Winner    צל"ש   מומחה  
אשכול מספר 11315
DDorr

   20:21   09.12.06   
אל הפורום  
  בעיה בהעלאת קבצים לאתר :)  
 
  
זה הלינק לאתר:
http://dorcohen.9999mb.com/index.php

תנסו לעלות קובץ.. זה נותן שגיאה. (אל תייחסו לכל מיני שגיאות כיתב וכאלה הכל עוד בבנייה)

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 3917 is not allowed to access /www/9999mb.com/d/o/r/dorcohen/htdocs/uploads/091206 owned by uid 2001 in /www/9999mb.com/d/o/r/dorcohen/htdocs/sources/do_upload.php on line 84

הקוד של הדף :



if( !defined('in_system') )
{
echo "access denied";
exit;
}

$do_upload = new do_upload;

class do_upload {

function do_upload()
{
global $std, $lang, $config;

$today = date("d").date("m").date("y");
$upload_dir = $config.$today."/";

if( !is_dir($upload_dir) )
{
mkdir($upload_dir,0777);
}

$size_bytes = $conifg;
$allowed_file_type = $config;

if( !is_dir($upload_dir) ) // if the upload dir does not exsit
{
$std->header();
$std->error_screen($lang);
$std->footer();
}

if( !is_writeable($upload_dir) ) // if the upload dir is not writable
{
$std->header();
$std->error_screen($lang);
$std->footer();
}

if( is_uploaded_file($_FILES]) ) // if user sent a file to upload
{
$filesize = $_FILES];

if( $filesize > $std->mb2bytes($config) ) // if user's file size is bigger then max file size which allowed
{
$std->header();
$std->error_screen($lang);
$std->footer();
}

$file_type = explode("/",$_FILES]);
$myFileType = $file_type;

if( $config == 1 && ! in_array( $myFileType , $config ) ) // if user's file type is not allowed
{
$std->header();
$std->error_screen($lang);
$std->footer();
}

// ########
// Create new file name
// ########
$filename = $_FILES];
$now = time();
$number = rand(1000,9999);
$new_name = substr($now,6,10).substr($number,1,3);
$type = $myFileType;

if ( move_uploaded_file($_FILES],$upload_dir.$new_name.".".$type) ) // if upload succeed
{
$std->header();
$link = "<a href=\"$upload_dir$new_name.$type\">$new_name</a>";
$std->print_html( file_uploaded( $link ) );
$std->footer();
exit;
} else {
// if was a problem during uploading
$std->header();
$std->error_screen($lang);
$std->footer();
}

} else {
// If user did not send a file to upload
$std->header();
$std->error_screen($lang);
$std->footer();
}

}
}


?>



                                שתף        
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

  האשכול     מחבר     תאריך כתיבה     מספר  
  תן גישת 777 לכל הקבצים והתקיות crazykid 10.12.06 05:37 1
     נתתי לכולם,עדיין. DDorr 10.12.06 13:50 2

       
crazykid
חבר מתאריך 28.8.03
4894 הודעות
   05:37   10.12.06   
אל הפורום  
  1. תן גישת 777 לכל הקבצים והתקיות  
בתגובה להודעה מספר 0
 
  



                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
DDorr

   13:50   10.12.06   
אל הפורום  
  2. נתתי לכולם,עדיין.  
בתגובה להודעה מספר 1
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

תגובה מהירה  למכתב מספר: 
 
___________________________________________________________________

___________________________________________________________________
למנהלים:  נעל | תייק בארכיון | מחק | העבר לפורום אחר | מחק תגובות | עגן אשכול
       



© כל הזכויות שמורות ל-רוטר.נט בע"מ rotter.net