5.3.0 !'); error_reporting(E_ALL ^ E_NOTICE); define('APP_NAME', "App"); define('APP_DEBUG',false); define('APP_PATH','./App/'); define('DEFAULT_MODULE','Home'); //定義分組 處理runtime文件夾 // $mobiles = is_mobiles(); // if($mobiles['is_mobiles']){ //跳轉至wap分組 // define('DEFAULT_MODULE','mobiles'); // }else{ // $config = include(APP_PATH.'/Common/Conf/config.php'); // $array = $config['MODULE_ALLOW_LIST']; // $end = end($array); // $requ = $_SERVER['REQUEST_URI']; // if(isset($_SERVER['PATH_INFO']) && !in_array($requ,array('/','/index.php'))){ // $path = $_SERVER['PATH_INFO']; // }else{ // $path = ''; // } // if(!empty($path)){ // $brr = explode('/',$path); // $group = $brr[1]; // if(!empty($group) && in_array($group,$array) && $end != $group){ // define('DEFAULT_MODULE',$group); // } else{ // define('DEFAULT_MODULE','Home'); // } // }else{ // define('DEFAULT_MODULE','Home'); // } // } define("RUNTIME_PATH_ALL", APP_PATH.'Runtime/'); define("RUNTIME_PATH", APP_PATH.'Runtime/'.DEFAULT_MODULE.'/'); function is_mobiles(){ $user_agent = $_SERVER['HTTP_USER_AGENT']; $mobiles_agents = Array("240x320","acer","acoon","acs-","abacho","ahong","airness","alcatel","amoi","androids","anywhereyougo.com","applewebkit/525","applewebkit/532","asus","audio","au-mic","avantogo","becker","benq","bilbo","bird","blackberry","blazer","bleu","cdm-","compal","coolpad","danger","dbtel","dopod","elaine","eric","etouch","fly ","fly_","fly-","go.web","goodaccess","gradiente","grundig","haier","hedy","hitachi","htc","huawei","hutchison","inno","ipads","ipaq","ipods","jbrowser","kddi","kgt","kwc","lenovo","lg ","lg2","lg3","lg4","lg5","lg7","lg8","lg9","lg-","lge-","lge9","longcos","maemo","mercator","meridian","micromax","midps","mini","mitsu","mmm","mmp","mobi","mot-","moto","nec-","netfront","newgen","nexian","nf-browser","nintendo","nitro","nokia","nook","novarra","obigo","palm","panasonic","pantech","philips","phones","pg-","playstation","pocket","pt-","qc-","qtek","rover","sagem","sama","samu","sanyo","samsung","sch-","scooter","sec-","sendo","sgh-","sharp","siemens","sie-","softbank","sony","spice","sprint","spv","symbian","tablet","talkabout","tcl-","teleca","telit","tianyu","tim-","toshiba","tsm","up.browser","utec","utstar","verykool","virgin","vk-","voda","voxtel","vx","wap","wellco","wig browser","wii","windows ces","wireless","xda","xde","zte"); $is_mobiles['is_mobiles'] = false; $is_mobiles['user_agent'] = false; foreach ($mobiles_agents as $device) { if (stristr($user_agent, $device)) { $is_mobiles['is_mobiles'] = true; break; } } return $is_mobiles; } require APP_PATH.'Common/Conf/define.php';?>