函式: dba_handlers()
適用版本: PHP 5, PHP 7
用法:
dba_handlers() 函式用於返回當前系統上可用的資料庫處理程式的列表。資料庫處理程式是用於管理資料庫檔案的工具。
示例:
// 獲取系統上可用的資料庫處理程式列表
$handlers = dba_handlers();
// 遍歷處理程式列表並輸出
foreach ($handlers as $handler) {
echo $handler . "<br>";
}
在上面的示例中,我們使用 dba_handlers() 函式獲取系統上可用的資料庫處理程式列表並將其儲存在變數 $handlers 中。然後我們使用 foreach 迴圈遍歷 $handlers,輸出每個處理程式的名稱。