qy-platform/Application/Site/Controller/SiteController.class.php

44 lines
861 B
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
namespace Site\Controller;
use Think\Controller;
/**
* 前台公共控制器
* 为防止多分组Controller名称冲突公共Controller名称统一使用分组名称
*/
class SiteController extends Controller {
/* 空操作用于输出404页面 */
public function _empty(){
$this->redirect('Index/index');
}
protected function _initialize(){
if (is_mobile_request()) {
C('DEFAULT_THEME','wap');
$device = get_devices_type();
define('DEVICES', $device ? $device : 1 );
} else {
define('DEVICES', '');
}
}
public function __construct(){
parent::__construct();
$this->assign('download_url',str_replace('site.php','site.php',$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].U('Down/index',array('account'=>I('account')))));
}
}