소스 검색

修改bug

chenbo 4 년 전
부모
커밋
266f8c0f4f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lib/input_sina_simple.class.php

+ 2 - 2
lib/input_sina_simple.class.php

@@ -8,7 +8,7 @@
 
 class Input_sina_simple
 {
-    private $globalUrl = "http://hq.sinajs.cn/list=";
+    const GLOBAL_URL = "http://hq.sinajs.cn/list=";
 
     static private function curl_get_data($url, $codeList){           //一次批量获取股票列表
         if (empty($codeList)) {
@@ -49,7 +49,7 @@ class Input_sina_simple
         $data['sector'] = $sector;
         $codeList = array();
         $codeIndex = 0;
-        $url = $this->globalUrl;
+        $url = self::GLOBAL_URL;
         for($code = $start;$code < $end; $code++){
             $codeStr = sprintf('%06s', $code);
             $url .= 's_'.$exchange.$codeStr.',';