protected function me() { echo 'Root: ' . Me::root() . '<br>'; echo 'URL: ' . Me::url() . '<br>'; echo 'Domain: ' . Me::domain() . '<br>'; echo 'Scheme: ' . Me::scheme() . '<br>'; echo 'Path: ' . Me::path() . '<br>'; echo 'Query: ' . Me::query() . '<br>'; }
public static function getJsConfig($app_id, $jsapi_ticket) { $return = array(); $return["appId"] = $app_id; $return["timestamp"] = time(); $return["nonceStr"] = "AnyString"; $return["url"] = Me::url(); $return["signature"] = sha1(sprintf("jsapi_ticket=%s&noncestr=%s×tamp=%s&url=%s", $jsapi_ticket, $return["nonceStr"], $return["timestamp"], $return["url"])); return $return; }
public function index() { $domainHome = array('www.luckyphp.com', 'home.luckyphp.com'); $domain = Me::domain(); if (in_array($domain, $domainHome)) { $data = array(); $root = Me::root(); $static = $root . 'static'; $data['static'] = $static; return Output::template('index/index.html', $data); } else { $data = array(); return Output::template('index/start.html', $data); } }
public function index() { $domainHome = array(); array_push($domainHome, 'www.luckyphp.com'); array_push($domainHome, 'home.luckyphp.com'); $domain = $_SERVER['SERVER_NAME']; if (in_array($domain, $domainHome)) { $data = array(); $root = Me::root(); $static = $root . 'static'; $data['static'] = $static; return View::html('index/index.html', $data); } else { $data = array(); return View::html('index/start.html', $data); } }
protected function upload() { $data = array(); $data['root'] = Me::root(); return View::html('test/upload.html', $data); }