/ **
* determine whether the current micro-channel browser or APP client
* /
function isWeixinEsz ()
{
IF (the strpos ($ _ SERVER [ 'the HTTP_USER_AGENT'],
'MicroMessenger') == to false!) {
Return. 1;
} the else {
$ isApp = \ Think \ cookies :: GET ( 'isApp');
IF ($ isApp) {
return 2;
} the else {
$ isApp = \ Think \ the Request :: instance () -> GET ( 'isAPP', to false );
IF ($ isApp) {
\ Think \ cookies :: SET ( 'isApp',. 1);
return 2;
} the else {
return 0;
}
}
}
return 0;
}
Determine whether the current letter is a micro-browser or client APP
Guess you like
Origin www.cnblogs.com/2019gdiceboy/p/11089947.html
Ranking