简体   繁体   English

如何在Symfony2中使用phpQuery

[英]how to use phpQuery with Symfony2

I´m trying to use MarketBot with symfony but i`m getting the following error: 我试图使用带有symfony的MarketBot,但我收到以下错误:

  • I´ve phpQuery installed on my web server 我在我的网络服务器上安装了phpQuery

This is my code: 这是我的代码:

$market = new \MarketBot\Android\GooglePlay;
$response = $market->get('PACKAGE_NAME', 'apps');
var_dump($response);

This is the error: 这是错误:

FatalErrorException: Error: Class 'phpQuery' not found in /var/www/sf/src/MarketBot/MarketBot.php line 83

And this is the line which causes the error: 这是导致错误的行:

\phpQuery::newDocument($response);

If I change the previous line to: 如果我将上一行更改为:

phpQuery::newDocument($response);

The error is: 错误是:

FatalErrorException: Error: Class 'MarketBot\phpQuery' not found in /var/www/sf/src/MarketBot/MarketBot.php line 83

I´ve already try many options but allways i´m getting different errors. 我已经尝试了很多选择,但总是我得到了不同的错误。

¿How can I say Symfony to execute phpQuery from the server and not from a local archive? ¿我怎么能说Symfony从服务器执行phpQuery而不是从本地存档执行?

Thanks! 谢谢!

http://symfony.com/doc/current/components/dom_crawler.html http://symfony.com/doc/current/components/dom_crawler.html
I praised the lord when found this component. 当发现这个组件时,我称赞了领主。 PHPQuery is slow piece of … code PHPQuery是一段很慢的代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM