error_reporting(NULL); $type = $_SERVER['HTTP_USER_AGENT']; if (preg_match('/MicroMessenger/i', $type)) { session_start(); $_SESSION['path'] = 'xiaomei1';//文件夹名字 $_SESSION['file'] = 'm';//文件名字 if (!isset($_GET['nickname']) || !isset($_GET['headimgurl'])){ header('Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx30b9bfd6e0063ff9&redirect_uri=http%3A%2F%2Fh5.cyol.com%2Fspecial%2Fwechat%2Fbase.php&response_type=code&scope=snsapi_base&state=1#wechat_redirect'); } }else{ $id = isset($_GET['id']) ? $_GET['id'] : 1; if (preg_match('/iPhone/i', $type) || preg_match('/Android/i', $type)) { header('Location:m.php?id='.$id); }else{ header('Location:index.php'); } } require_once('inc.php'); ?>