全球VPS大学 大佬有话说 :
帮忙看下我这个PHP语法有没有错误,为啥不能正常运行
本帖最后由 全球VPS大学 于 2020-2-14 19:41 编辑
if($GLOBALS[‘config’][‘app’][‘encrypt’]==’3′){
require_once ‘encryption.php’;//引用加密文件
$player_info[‘url’] = encryption_en::encode($player_info[‘url’],’123′);
$player_info[‘url_next’] = encryption_en::encode($player_info[‘url_next’],’123′);
}
//其中 $player_info[‘url’]是一个标签。
/ 加密方式是这个调用的 encryption_en::encode(‘abc’,’123′);
//其中123是密钥
然后总是提示encryption_en’ not found 错误
//encryption.php 部分代码
class encryption_en{
private static $default_key = ‘123’;
public static function encode($string,$key = ”, $expiry = 0){
$ckeyLength = 4;
$key = md5($key ? $key : self::$default_key);
$keya = md5(substr($key, 0, 16));
$keyb = md5(substr($key, 16, 16));
$keyc = substr(md5(microtime()), – $ckeyLength);
叫妇 大佬有话说 :
这几行代码没语法问题