PHP 快速導覽 - 核心延伸函數 目錄相關 scandir()
- Get link
- X
- Other Apps

PHP 快速導覽 - 核心延伸函數 目錄相關 scandir()
內建函數 (function) scandir() 將目錄路徑資料回傳為陣列
函數 | 說明 |
---|---|
array scandir(string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context]]) | $directory 為目錄路徑。 |
參數 (parameter) 為目錄路徑,須注意回傳的是陣列。
舉例如下
<?php
$d = scandir('./example/');
print_r($d);
/* 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:dir05.php
功能:示範 PHP 程式
作者:張凱慶
時間:西元 2013 年 2 月 */
?>
執行結果如下

中英文術語對照 | |
---|---|
函數 | function |
參數 | parameter |
您可以繼續參考
目錄相關
- chdir()
- closedir()
- dir()
- getcwd()
- opendir()
- readdir()
- rewinddir()
- scandir()
相關目錄
回 PHP 快速導覽
回 PHP 教材
回首頁
參考資料
http://www.php.net/manual/en/function.scandir.php
訂閱:
張貼留言 (Atom)
window.___gcfg = { 'lang': 'zh-TW' };
- Get link
- X
- Other Apps
沒有留言:
張貼留言