导航首页 » 技术教程 » PHP:mcrypt_list_modes()的用法_Mcrypt函数
PHP:mcrypt_list_modes()的用法_Mcrypt函数 164 2023-12-15   

mcrypt_list_modes

(PHP 4 >= 4.0.2, PHP 5)

mcrypt_list_modes — 获取所支持的模式

说明

array mcrypt_list_modes ([ string $lib_dir = ini_get("mcrypt.modes_dir") ] )

获取 lib_dir 中 包含的受支持的模式。

参数

lib_dir

指定模式所在的位置。 如果未指定,将使用 php.ini 中的 mcrypt.modes_dir 指示所指定的位置。

返回值

以数组形式返回受支持的模式。

范例

Example #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)。


!!!站长长期在线接!!!

网站、小程序:定制开发/二次开发/仿制开发等

各种疑难杂症解决/定制接口/定制采集等

站长微信:lxwl520520

站长QQ:1737366103