手册目录
API
只需要引入vendor/autoload.php文件就可以使用QueryList及其所有插件了(如果安装了插件的话)。
例:
<?php
require 'vendor/autoload.php';
use QL\QueryList;
$hj = QueryList::Query('http://mobile.csdn.net/',array("url"=>array('.unit h1 a','href')));
$data = $hj->getData(function($x){
return $x['url'];
});
print_r($data);
手动安装的
手动下载phpQuery.php和QueryList.php这两个文件,然后手动引入这两个文件就可以了。
例:
<?php
require 'phpQuery.php';
require 'QueryList.php';
use QL\QueryList;
$hj = QueryList::Query('http://mobile.csdn.net/',array("url"=>array('.unit h1 a','href')));
$data = $hj->getData(function($x){
return $x['url'];
});
print_r($data);
手动安装QueryList插件
path/to/QueryList/
path/to/QueryList/Ext/
path/to/QueryList/Ext/Lib/遵循当前使用的框架的引入类库的规则引入即可使用,后面将做专题讲解。
相关视频
科技资讯
24小时阅读榜
1
2
3
4
5
6
7
8
9
10
精品课程
共5课时 | 17.4万人学习
共49课时 | 78.2万人学习
共29课时 | 62.5万人学习
共25课时 | 39.8万人学习
共43课时 | 73.8万人学习