在php中使用crypt函數對數據進行加密,具體方法如下:
crypt函數語法:
string crypt ( string $str [, string $salt ] )
crypt函數使用方法:
// 需要加密的字符串$str = 'this is string';$res = crypt($str);$res = crypt($str, 'ly');
// 需要加密的字符串
$str = 'this is string';
$res = crypt($str);
$res = crypt($str, 'ly');