Exemple #1
0
 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>';
 }
Exemple #2
0
 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&timestamp=%s&url=%s", $jsapi_ticket, $return["nonceStr"], $return["timestamp"], $return["url"]));
     return $return;
 }