Home php PHPQuery & GT; Fatal Error

PHPQuery & GT; Fatal Error

Author

Date

Category

Trying to make a parser on phpquery, get a DOM document through:

Require_ONCE __Dir__. '/vendor/autolaoad.php';
Use phpQuery \ phpquery;
$ PQ = New phpQuery;
$ HBr = file_get_contents ('https://snipp.ru/demo/76/index.html');
$ Dom = $ PQ- & GT; NewDocument ($ HTML);

I get a mistake:

Fatal Error: Uncaught Error: Call to undefined Method phpquery \ phpquery :: newdocument () in z: \ domains \ NEOWIN \ 1.PHP: 8 Stack Trace: # 0 {Main} Thrown in Z: \ Domains \ Neowin \ 1.PHP on Line 8

Answer 1

$ hr = file_get_contents ('https://snipp.ru/demo/76/index.html');
$ Dom = phpQuery :: NewDocument ($ HTML);

or

$ hr = file_get_contents ('https://snipp.ru/demo/76/index.html');
$ Dom = phpQuery :: NewDocument ($ HTML);

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions