file:// - 로컬 파일 시스템 액세스

file:// — 로컬 파일 시스템에 액세스


설명

파일 시스템은 PHP와 함께 사용되는 기본 래퍼이며 로컬 파일 시스템을 나타냅니다. 상대 경로가 지정되면(/, \, \\ 또는 Windows 드라이브 문자로 시작하지 않는 경로) 제공된 경로가 현재 작업 디렉토리에 적용됩니다. 대부분의 경우 이것은 스크립트가 변경되지 않는 한 스크립트가 있는 디렉토리입니다. CLI sapi를 사용하면 기본적으로 스크립트가 호출된 디렉토리로 설정됩니다.

fopen()file_get_contents()와 같은 일부 함수를 사용하면 include_path에서 상대 경로도 선택적으로 검색할 수 있습니다.


용법

  • /path/to/file.ext
  • relative/path/to/file.ext
  • fileInCwd.ext
  • C:/path/to/winfile.ext
  • C:\path\to\winfile.ext
  • \\smbserver\share\path\to\winfile.ext
  • file:///path/to/file.ext

옵션

Wrapper Summary

Attribute Supported
Restricted by allow_url_fopen No
Allows Reading Yes
Allows Writing Yes
Allows Appending Yes
Allows Simultaneous Reading and Writing Yes
Supports stat() Yes
Supports unlink() Yes
Supports rename() Yes
Supports mkdir() Yes
Supports rmdir() Yes