⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 20c02-1.php

📁 介绍PHP5的给类型函数应用
💻 PHP
字号:
<?php// Assume that we have been given the following password:$password = 'bob123xy';// Now encrypt this password, we will not provide the optional second// parameter to specify a 'salt' or 'seed' for the encryption, since the// specifics can vary per system, easiest to leave it blank.$enc = crypt($password);// Now, let's assume that we've just been given a password as part of a login// Let's try to recrypt it to match.  This time pass the encrypted version as// the 'salt' so that it can generate it again.  The original salt is saved // as part of the encryption process. -- This should echo GOOD.if (crypt($password, $enc) == $enc) {	echo 'GOOD';} else {	echo 'FAILED';}?>

⌨️ 快捷键说明

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