0

代码:

<?php
namespace app\admin\Controller;
use think\Controller;
use app\admin\controller\Check;
use think\Db;
use think\Request;
use QL\QueryList;
use QL\Ext\PhantomJs;
class Grab extends Check {
    
    public function index()
    {
        
        $path = DS. 'public' . DS . 'static' . DS . 'phantomjs';
        $ql = QueryList::getInstance();
        $ql->use(PhantomJs::class,$path);       
        $html = $ql->browser('http://www.ooopic.com/')->getHtml();
        print_r($html);
        
    }


}



报错:

Declaration of JonnyW\PhantomJs\DependencyInjection\ServiceContainer::load() should be compatible with Symfony\Component\DependencyInjection\Container::load($file)
2018-01-05 提问
2 个回答
0
\JonnyW\PhantomJs\DependencyInjection\ServiceContainer

public function load($file = null) {}
0

楼上正解,QueryList文档也有说明:http://doc.querylist.cc/site/...

撰写答案

你可能感兴趣的

推广链接