📄 global.php
字号:
<?php
function random($length,$chars='0123456789')
{
$hash = '';
$chars = '0123456789';
$max = strlen($chars) - 1;
mt_srand((double)microtime() * 1000000);
for($i = 0; $i < $length; $i++) {
$hash .= $chars[mt_rand(0, $max)];
}
return $hash;
}
function phpcms_base64($str,$type='encode',$token='/',$sp='_')
{
//$type: 1=encode 0=decode
$encode = $type == "encode" ? 1 : 0;
$str=trim($str);
if($encode)
{
$str=base64_encode($str);
$str2=str_replace($token,$sp,$str);
}
else
{
$str=str_replace($sp,$token,$str);
$str2=base64_decode($str);
}
return $str2;
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -