1.下载phpQuery:
https://github.com/phpquery/phpquery
2.放在ThinkPHP框架该目录下
/ThinkPHP/Library/Vendor
3.控制器里如何使用?
// 导入phpQuery
Vendor('phpQuery.phpQuery');
$filePath = 'https://www.amazon.com/dp/B016B40XT6';
$fileContent = file_get_contents($filePath);
$doc = \phpQuery::newDocumentHTML($fileContent);
dump($doc);