mcrypt_list_modes
(PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0)
mcrypt_list_modes — 獲取所支援的模式
警告
本函式已自 PHP 7.1.0 起廢棄。強烈建議不要使用本函式。
說明
mcrypt_list_modes(string
$lib_dir
= ini_get("mcrypt.modes_dir")): array
獲取 lib_dir
中
包含的受支援的模式。
參數
-
lib_dir
-
指定模式所在的位置。 如果未指定,將使用 php.ini 中的
mcrypt.modes_dir
指示所指定的位置。
返回值
以陣列形式返回受支援的模式。
範例
示例 #1 mcrypt_list_modes() 例程
<?php
$modes = mcrypt_list_modes();
foreach ($modes as $mode) {
echo "$mode <br />\n";
}
?>
本例程列出在預設目錄中
所有受支援的模式。
如果在 php.ini 中未指定 mcrypt.modes_dir
,
則使用預設的 mcrypt 庫
安裝目錄(/usr/local/lib/libmcrypt)。