获取全站详情链接,并输出为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("
", $vid);
        file_put_contents("全站链接.txt", $str);

        // dump('$vid');die;
        // return $this->view->fetch();
    }
原文地址:https://www.cnblogs.com/seanpan/p/14133339.html