<h1 id="h1--md5-"><a name="一、MD5加密" class="reference-link"></a><span class="header-link octicon octicon-link"></span>一、MD5加密</h1><ul> <li>把字符串加密为32位的加密码</li><li>md5不能解密,没有反转。</li><li>sha1加密为40位的加密码<pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-php"><span class="pln">md5</span><span class="pun">();</span></code></li><li class="L1"><code class="lang-php"><span class="pln">sha1</span><span class="pun">();</span></code></li></ol></pre> </li><li>不能加密数组<h1 id="h1--"><a name="二、数组函数" class="reference-link"></a><span class="header-link octicon octicon-link"></span>二、数组函数</h1>动态传值,用$args<pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-php"><span class="kwd">function</span><span class="pln"> arg</span><span class="pun">(...</span><span class="pln">$args</span><span class="pun">){</span></code></li><li class="L1"><code class="lang-php"><span class="pln"> print_r</span><span class="pun">(</span><span class="pln">$args</span><span class="pun">)</span></code></li><li class="L2"><code class="lang-php"><span class="pun">}</span></code></li></ol></pre> <h1 id="h1--if-if-"><a name="三、if语句与if条件" class="reference-link"></a><span class="header-link octicon octicon-link"></span>三、if语句与if条件</h1><pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code class="lang-php"><span class="kwd">if</span><span class="pun">(条件){</span></code></li><li class="L1"><code class="lang-php"><span class="pln"> </span><span class="pun">代码:</span></code></li><li class="L2"><code class="lang-php"><span class="pun">}</span></code></li><li class="L3"><code class="lang-php"><span class="kwd">else</span><span class="pln"> </span><span class="kwd">if</span><span class="pun">(条件){</span></code></li><li class="L4"><code class="lang-php"><span class="pln"> </span><span class="pun">代码:</span></code></li><li class="L5"><code class="lang-php"><span class="pun">}</span></code></li><li class="L6"><code class="lang-php"><span class="kwd">else</span><span class="pun">{</span></code></li><li class="L7"><code class="lang-php"><span class="pln"> </span><span class="pun">代码:</span></code></li><li class="L8"><code class="lang-php"><span class="pun">}</span></code></li></ol></pre> </li></ul>