chenbo %!s(int64=5) %!d(string=hai) anos
pai
achega
266f8c0f4f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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.',';