ThinkPHP3.2中使用第三方库(phpQuery)
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);
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。