略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: mcrypt_list_modes

2024-05-02

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

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.mcrypt-list-modes.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3