function.mcrypt-list-modes.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 69 行

HTML
69
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Get an array of all supported modes</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.mcrypt-list-algorithms.html">mcrypt_list_algorithms</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.mcrypt-module-close.html">mcrypt_module_close</a></div> <div class="up"><a href="ref.mcrypt.html">Mcrypt Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.mcrypt-list-modes" class="refentry"> <div class="refnamediv">  <h1 class="refname">mcrypt_list_modes</h1>  <p class="verinfo">(PHP 4 &gt;= 4.0.2, PHP 5)</p><p class="refpurpose"><span class="refname">mcrypt_list_modes</span> &mdash; <span class="dc-title">Get an array of all supported modes</span></p> </div>  <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">array</span> <span class="methodname"><b><b>mcrypt_list_modes</b></b></span>    ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$lib_dir</tt></span>  ] )</div>  <p class="para rdfs-comment">   <b>mcrypt_list_modes()</b> is used to get an   array of all supported modes in the   <i><tt class="parameter">lib_dir</tt></i>.  </p>  <p class="para">   <b>mcrypt_list_modes()</b> takes as optional   parameter a directory which specifies the directory where all   modes are located. If not specifies, the value of the   mcrypt.modes_dir <var class="filename">php.ini</var> directive is used.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 <b>mcrypt_list_modes()</b> Example</b></p>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;$modes&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mcrypt_list_modes</span><span style="color: #007700">();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(</span><span style="color: #0000BB">$modes&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$mode</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"$mode&nbsp;&lt;br&nbsp;/&gt;\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>    <div class="example-contents"><p>     The above example will produce a list with all supported     algorithms in the default mode directory. If it is not set     with the ini directive mcrypt.modes_dir, the default directory     of mcrypt is used (which is /usr/local/lib/libmcrypt).    </p></div>   </div>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.mcrypt-list-algorithms.html">mcrypt_list_algorithms</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.mcrypt-module-close.html">mcrypt_module_close</a></div> <div class="up"><a href="ref.mcrypt.html">Mcrypt Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?