mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Remove incorrect information from example.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@165351 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6590104c96
commit
4712b29ecc
1 changed files with 3 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.crypt">
|
||||
<refnamediv>
|
||||
|
@ -105,18 +105,14 @@ if (crypt($user_input, $password) == $password) {
|
|||
</example>
|
||||
<example>
|
||||
<title>Using <function>crypt</function> with htpasswd</title>
|
||||
<para>
|
||||
To create a password for use with an apache htpasswd file, you'll need to
|
||||
use the first two letters of the password as the salt.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Set the password
|
||||
$password = 'mypassword';
|
||||
|
||||
// Get the hash
|
||||
$hash = crypt($password, substr($password, 0, 2));
|
||||
// Get the hash, letting the salt be automatically generated
|
||||
$hash = crypt($password);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue