View Single Post
ישן 14-02-09, 18:40   # 18
DorOaki
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Jul 2007
הודעות: 229

DorOaki לא מחובר  

PHP קוד:
<?php  
if ( isset( $_POST['check_if_press']) && $_POST['check_if_press'] == "send_file" )   

{  

    if ( ! empty ( 
$_FILES['my_file']['name'] ) )   
    {  
        
$dir getcwd()."/images/";  
    
$adress "http://blabla.com";
    
$link $adress $_SERVER['PHP_SELF'] . "/images/" $_FILES['my_file']['name'];
        
move_uploaded_file$_FILES['my_file']['tmp_name'] , $dir.$_FILES['my_file']['name'] );   
        echo 
"Weldone, You have been uploaded the file. The link : " $link;  
    }  

}  
?>  

<form action="<?php echo $PHP_SELF?>" method="post" enctype="multipart/form-data">   
    Upload file: <input type="file" name="my_file" /><br />  
  <input type="submit" name="check_if_press" value="send_file"  />  
</form>
תהנה..דרך מסורבלת אבל זה הקוד שהבאת..
  Reply With Quote