gwang 5 年 前
コミット
55fb119025

+ 5 - 13
Gameserver/gamesys/app/providers/login.php

@@ -1,23 +1,15 @@
 <?php
+
 session_start();
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-include_once dirname(__FILE__).'/../main.php';
-/**
- * Description of login
- * 登录页面业务逻辑
- * @author jgao
- */
+
+include_once dirname(__FILE__) . '/../main.php';
 
 $paras = query_paras();
 $username = $paras["username"];
 $password = $paras["password"];
 
 
-if($username == "admin" && $password == "123456"){
+if ($username == "admin" && $password == "123456") {
     // 同时写入cookie和session,用作后续前后端身份验证判定
     setcookie("account", $username, time() + 3600, "/");
     $_SESSION["account"] = $username;
@@ -25,7 +17,7 @@ if($username == "admin" && $password == "123456"){
     header("Location:" . getPageUrl("index"));
     // 确保重定向后,后续代码不会被执行 
     exit;
-}else{
+} else {
     // 否则认为是非法请求
     header("Location:" . getPageUrl("err"));
     // 确保重定向后,后续代码不会被执行 

+ 1 - 1
Gameserver/gamesys/globals.php

@@ -14,7 +14,7 @@ define("GAME_PLAT", "main"); // main 360 baidu dcn mi uc
 if (GAME_ONLINE) {
 
     // TODO: config the cdb set
-    define("CDB_HOST", "127.0.0.1"); // 正式地址
+    define("CDB_HOST", "localhost"); // 正式地址
     define("CDB_PORT", "3306");
     define("CDB_USER", "root");
     define("CDB_PASS", "wanggang1985");

+ 1 - 0
Gameserver/nbproject/private/private.xml

@@ -12,6 +12,7 @@
     </editor-bookmarks>
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
         <group>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/config.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/base/CmdCode.php</file>
         </group>
     </open-files>