| 12345678910111213141516171819202122 |
- <?php
- /**
- * Created by PhpStorm.
- * User: 王刚涛
- * Date: 2020/11/24
- * Time: 19:16
- * 获取并更新股票的基本信息
- */
- require('../init.php');
- $codeList=Stock::getStockCodeList();//获取所有股票代码
- if (empty($codeList))
- {
- throw new Exception('参数列表不能为空', 102);
- }
- //遍历股票代码
- foreach($codeList as $key => $val){
- $code=intval($val);
- FinanceTencent::get_stock_data($code);
- }
|