当前位置: 首页>>代码示例>>PHP>>正文


PHP S::checkAuth方法代码示例

本文整理汇总了PHP中S::checkAuth方法的典型用法代码示例。如果您正苦于以下问题:PHP S::checkAuth方法的具体用法?PHP S::checkAuth怎么用?PHP S::checkAuth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在S的用法示例。


在下文中一共展示了S::checkAuth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

 static function main()
 {
     haxe_Log::$trace = isset(me_cunity_php_Debug::$_trace) ? me_cunity_php_Debug::$_trace : array("me_cunity_php_Debug", "_trace");
     S::$conf = Config::load("appData.js");
     php_Session::start();
     $pd = php_Web::getPostData();
     haxe_Log::trace($pd, _hx_anonymous(array("fileName" => "S.hx", "lineNumber" => 54, "className" => "S", "methodName" => "main")));
     $params = php_Web::getParams();
     if ($params->get("debug") === "1") {
         header("Content-Type" . ": " . "text/html; charset=utf-8");
         S::$headerSent = true;
         php_Lib::println("<div><pre>");
         php_Lib::println($params);
     }
     haxe_Log::trace(Date::now()->toString(), _hx_anonymous(array("fileName" => "S.hx", "lineNumber" => 63, "className" => "S", "methodName" => "main")));
     haxe_Log::trace($params, _hx_anonymous(array("fileName" => "S.hx", "lineNumber" => 64, "className" => "S", "methodName" => "main")));
     $action = $params->get("action");
     if (strlen($action) === 0 || $params->get("className") === null) {
         S::dump(_hx_anonymous(array("error" => "required params missing")));
         return;
     }
     S::$my = new MySQLi("localhost", S::$dbUser, S::$dbPass, S::$db, null, null);
     $auth = S::checkAuth();
     haxe_Log::trace(_hx_string_or_null($action) . ":" . Std::string($auth), _hx_anonymous(array("fileName" => "S.hx", "lineNumber" => 77, "className" => "S", "methodName" => "main")));
     if (!$auth) {
         S::hexit("AUTH FAILURE");
         return;
     }
     $result = Model::dispatch($params);
     haxe_Log::trace($result, _hx_anonymous(array("fileName" => "S.hx", "lineNumber" => 85, "className" => "S", "methodName" => "main")));
     if (!S::$headerSent) {
         header("Content-Type" . ": " . "application/json");
         S::$headerSent = true;
     }
     php_Lib::println($result);
 }
开发者ID:axelhuizinga,项目名称:gem,代码行数:36,代码来源:S.class.php


注:本文中的S::checkAuth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。