컴

stat — 파일에 대한 정보를 제공합니다.

· 2017-01-01 (일) 22:51:25 · 2435

stat — 파일에 대한 정보를 제공합니다.

 

설명 :

array stat ( string $filename )

 

filename에 의해 명명 된 파일의 통계를 수집합니다. filename이 심볼릭 링크 인 경우, 통계는 심볼 링크가 아닌 파일 자체의 것입니다.

 

lstat ()는 symlinks 상태를 기반으로하지 않는다는 점을 제외하고 stat ()와 동일합니다.

 

인수 :

 

filename

파일 경로.

 

오류/예외 :

실패하면 E_WARNING이 발생합니다.

 

예제 :

 

 

<?php

/* Get file stat */

$stat = stat('C:\php\php.exe');

 

/*

 * Print file access time, this is the same 

 * as calling fileatime()

 */

echo 'Access time: ' . $stat['atime'];

 

/*

 * Print file modification time, this is the 

 * same as calling filemtime()

 */

echo 'Modification time: ' . $stat['mtime'];

 

/* Print the device number */

echo 'Device number: ' . $stat['dev'];

?>

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

개발자팁

5,403건

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

+
분류 제목 글쓴이 날짜 조회
PHP 17-02-24 조회 3,648
PHP 17-02-24 조회 3,123
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,636
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,434
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,604
PHP 17-02-13 조회 2,940