rmdir
(PHP 4, PHP 5)
rmdir — Removes directory
說明
bool rmdir
( string $dirname
[, resource $context
] )
Attempts to remove the directory named by dirname . The directory must be empty, and the relevant permissions must permit this.
參數
- dirname
-
Path to the directory.
- context
-
Note: 對 context 的支援是 PHP 5.0.0 增加的。有關 context 的說明見Streams。
Return值
如果成功則回傳 TRUE,失敗則回傳 FALSE。
更新日誌
版本 | 說明 |
---|---|
5.0.0 | As of PHP 5.0.0 rmdir() can also be used with some URL wrappers. Refer to List of Supported Protocols/Wrappers for a listing of which wrappers support rmdir(). |
註釋
Note: 當安全模式被啟用時,PHP 將檢查被操作的目錄是否和正在執行的腳本有相同的 UID(擁有者)。