PHP 手冊
前一頁 |  | 下一頁

# CI. POSIX Functions

# 介紹

This module contains an interface to those functions defined in the IEEE 1003.1 (POSIX.1) standards document which are not accessible through other means. POSIX.1 for example defined the open(), read(), write() and close() functions, too, which traditionally have been part of PHP 3 for a long time. Some more system specific functions have not been available before, though, and this module tries to remedy this by providing easy access to these functions.

警告
Sensitive data can be retrieved with the POSIX functions, e.g. posix_getpwnam() and friends. None of the POSIX function perform any kind of access checking when safe mode is enabled. It's therefore strongly advised to disable the POSIX extension at all (use --disable-posix in your configure line) if you're operating in such an environment.

> 注: 此延伸不適用於 Windows 平台。

# 安裝

POSIX functions are enabled by default. You can disable POSIX-like functions with --disable-posix.

# 預先定義常數

以下的常數由此延伸定義，只在這個延伸被編譯成PHP或實行時期被動態載入時有效。

`POSIX_F_OK` (integer)

  Check whether the file exists.

`POSIX_R_OK` (integer)

  Check whether the file exists and has read permissions.

`POSIX_W_OK` (integer)

  Check whether the file exists and has write permissions.

`POSIX_X_OK` (integer)

  Check whether the file exists and has execute permissions.

> 注: These constants are available since PHP 5.1.0.

# 參考

The section about Process Control Functions maybe of interest for you.

前一頁 | 內容 | 下一頁
pg_version | 上一層 | posix_access