首頁 > 後端開發 > php教程 > 下面这句代码哪里错了

下面这句代码哪里错了

WBOY
發布: 2016-06-23 14:27:49
原創
931 人瀏覽過

$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);
登入後複製

<?php$aid = 11387;$_G['uid'] = 332;$tid =50;define('TIMESTAMP', time());function aidencode($aid, $type = 0, $tid = 0) {	global $_G;	global $tid;	$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);?>
登入後複製

來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板