欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

下面这句代码哪里错了

程序员文章站 2024-02-04 17:28:16
...
$aid = 11387;$_G['uid'] = 332;$tid =50;function aidencode($aid, $type = 0, $tid = 0) {	$s = !$type ? $aid.'|'.substr(md5($aid.md5('asdfasfas'.TIMESTAMP.$_G['uid']), 0, 8).'|'.TIMESTAMP.'|'.$_G['uid'].'|'.$tid : $aid.'|'.md5($aid.md5('asdfasfas').TIMESTAMP).'|'.TIMESTAMP;	return rawurlencode(base64_encode($s));}echo aidencode(11387);


麻烦知道的大哥直接给完整代码谢谢了

回复讨论(解决方案)

$aid = 11387;$_G['uid'] = 332;$tid =50;function aidencode($aid, $type = 0, $tid = 0) {    $s = !$type ? $aid.'|'.substr(md5($aid.md5('asdfasfas'.TIMESTAMP.$_G['uid'])), 0, 8).'|'.TIMESTAMP.'|'.$_G['uid'].'|'.$tid  : $aid.'|'.md5($aid.md5('asdfasfas').TIMESTAMP).'|'.TIMESTAMP;    return rawurlencode(base64_encode($s));}echo aidencode(11387);