获取全站详情链接,并输出为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();
    }

 

posted @ 2020-12-14 15:05  潘潘潘的博客  阅读(198)  评论(0编辑  收藏  举报