Notice
														
													
												
											
												
												
													Recent Posts
													
											
												
												
													Recent Comments
													
											
												
												
											
									Data Analysis for Investment & Control
PHP - move_uploaded_file() 본문
반응형
    
    
    
  파일을 업로드 할 때 사용하는 함수입니다.
정의는 아래와 같습니다.
bool move_uploaded_file ( string $filename , string $destination )
Parameters
filename : The filename of the uploaded file.
destination : The destination of the moved file.
Return Values
If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE.
If filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file() will return FALSE. Additionally, a warning will be issued.
filename : The filename of the uploaded file.
destination : The destination of the moved file.
Return Values
If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE.
If filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file() will return FALSE. Additionally, a warning will be issued.
예제)
 $error) {
    if ($error == UPLOAD_ERR_OK) {
        $tmp_name = $_FILES["pictures"]["tmp_name"][$key];
        $name = $_FILES["pictures"]["name"][$key];
        move_uploaded_file($tmp_name, "$uploads_dir/$name");
    }
}
?>
끝!
반응형
    
    
    
  'Code > WEB' 카테고리의 다른 글
| PHP - $_FILES (0) | 2010.10.25 | 
|---|---|
| PHP - serialize() / unserialize() (0) | 2010.10.25 | 
| HTML TAG - enctype (0) | 2010.10.25 | 
| 스마트한 게시판 만들기 - 네이버 <스마트 에디터>와 다음 <다음 에디터>의 오픈소스 활용 (0) | 2010.10.12 | 
| DOM(Document Object Model) (0) | 2010.10.04 | 
								  Comments