컴

ftp_mdtm - 주어진 파일의 마지막 수정 시간을 반환합니다.

· 2017-02-17 (금) 23:07:50 · 2628

ftp_mdtm - 주어진 파일의 마지막 수정 시간을 반환합니다.

 

설명 ¶

 

int ftp_mdtm ( resource $ftp_stream , string $remote_file )

ftp_mdtm () 은 원격 파일의 마지막 수정 시간을 얻습니다.

 

참고 :

모든 서버가이 기능을 지원하지는 않습니다!

참고 :

ftp_mdtm () 은 디렉토리에서 작동하지 않습니다.

매개 변수 ¶

 

ftp_stream

FTP 연결의 링크 식별자입니다.

 

remote_file

마지막 수정 시간을 추출 할 파일입니다.

 

반환 값 ¶

 

성공시 Unix 타임 스탬프로 마지막 수정 시간을 반환합니다. 오류가 발생하면 -1을 반환합니다.

 

예 ¶

 

Example # 1 ftp_mdtm () 예제

 

<?php

 

$file = 'somefile.txt';

 

// set up basic connection

$conn_id = ftp_connect($ftp_server);

 

// login with username and password

$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

 

//  get the last modified time

$buff = ftp_mdtm($conn_id, $file);

 

if ($buff != -1) {

    // somefile.txt was last modified on: March 26 2003 14:16:41.

    echo "$file was last modified on : " . date("F d Y H:i:s.", $buff);

} else {

    echo "Couldn't get mdtime";

}

 

// close the connection

ftp_close($conn_id);

 

?>

|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
PHP 17-02-24 조회 3,648
PHP 17-02-24 조회 3,121
jQuery 17-02-23 조회 2,612
jQuery 17-02-23 조회 2,894
jQuery 17-02-23 조회 2,631
jQuery 17-02-22 조회 2,445
PHP 17-02-21 조회 2,688
PHP 17-02-21 조회 2,627
PHP 17-02-21 조회 4,424
PHP 17-02-20 조회 3,635
PHP 17-02-20 조회 3,028
PHP 17-02-20 조회 3,026
PHP 17-02-19 조회 2,850
PHP 17-02-19 조회 2,685
PHP 17-02-19 조회 2,825
PHP 17-02-17 조회 2,562
PHP 17-02-17 조회 2,989
PHP 17-02-17 조회 2,629
jQuery 17-02-16 조회 3,377
jQuery 17-02-16 조회 3,424
jQuery 17-02-16 조회 2,433
jQuery 17-02-15 조회 3,066
jQuery 17-02-15 조회 3,357
jQuery 17-02-15 조회 3,694
PHP 17-02-14 조회 2,889
PHP 17-02-14 조회 4,438
PHP 17-02-14 조회 2,680
PHP 17-02-13 조회 3,197
PHP 17-02-13 조회 2,603
PHP 17-02-13 조회 2,940