获取全站详情链接,并输出为txt文本
public function index() { $data = Db::table('sea_data')->field('v_id')->select(); $vid = array(); foreach ($data as $key => $value) { $vid[] = 'https://www.dianyingjia.cc/detail/' . $value['v_id'] . '.html'; } $str = implode("\r\n", $vid); file_put_contents("全站链接.txt", $str); // dump('$vid');die; // return $this->view->fetch(); }