本文整理汇总了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);
}