Browse Source

fix: add dir prefix.

Tony Chen 4 years ago
parent
commit
8ef7b00c9e
2 changed files with 3 additions and 8 deletions
  1. 3 5
      application/expand/controller/BaseAuth.php
  2. 0 3
      public/info.php

+ 3 - 5
application/expand/controller/BaseAuth.php

@@ -150,7 +150,6 @@ class BaseAuth extends Controller
     
     //是否开启debug模式
     private function _openDebug(){
-        
         if(isset($this->_sysParams['debug']) 
                 && $this->_sysParams['debug']=='xiepeng123@'){
             
@@ -222,10 +221,9 @@ class BaseAuth extends Controller
      * @return array
      */
     private function _getCompanyAuth($apiCode){
-        
-        $filePath = "./COMPANY_LIST/$apiCode/auth.php";
-        if(!file_exists($filePath)){
-            HelperService::returnJson(['code'=>400,'msg'=>"this apiCode error($apiCode)",'data'=>[]]);
+        $filePath = WEB_ROOT . "./COMPANY_LIST/$apiCode/auth.php";
+        if (!file_exists($filePath)) {
+            HelperService::returnJson(['code' => 400, 'msg' => "this apiCode error($apiCode)", 'data' => []]);
         }
 
         return require_once("{$filePath}");

+ 0 - 3
public/info.php

@@ -1,3 +0,0 @@
-<?php
- phpinfo();
-?>