正在显示
1 个修改的文件
包含
2 行增加
和
4 行删除
| @@ -313,10 +313,8 @@ class NewsController extends BaseController | @@ -313,10 +313,8 @@ class NewsController extends BaseController | ||
| 313 | ],[ | 313 | ],[ |
| 314 | 'keyword.required' => 'keyword不能为空', | 314 | 'keyword.required' => 'keyword不能为空', |
| 315 | ]); | 315 | ]); |
| 316 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('http://gnews.globalso.com/gnews_news.php?keyword='.$this->param['keyword'], true) . PHP_EOL, FILE_APPEND); | ||
| 317 | - $data = http_get('http://gnews.globalso.com/gnews_news.php?keyword='.$this->param['keyword'],['charset=utf-8']); | ||
| 318 | - | ||
| 319 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND); | 316 | + $data = shell_exec('curl -k "http://gnews.globalso.com/gnews_news.php?keyword='.$this->param['keyword'].'"'); |
| 317 | +// $data = http_get('http://gnews.globalso.com/gnews_news.php?keyword='.$this->param['keyword'],['charset=utf-8']); | ||
| 320 | $this->response('success',Code::SUCCESS,$data); | 318 | $this->response('success',Code::SUCCESS,$data); |
| 321 | } | 319 | } |
| 322 | } | 320 | } |
-
请 注册 或 登录 后发表评论