Laravel 5.1 PHP DOMXPath() class not found
News
Magento Tutorial
Wordpress
vTiger CRM
vTiger CRM Customer Portal
Premium Plugin
Git
Laravel
Mysql
Ionic Framework
- February 15, 2016
I'm using PHP's built-in DOMXPath() class to do some simple web-scrapping. However, it works on my 4.2 site, but not my 5.1 (both are on same installation of PHP).
Here's the error:
$list1 =newDOMXPath();
In Laravel 5.1 you must prefix the class name with the global namespace prefix '\'.
$list1 =new \DOMXPath();