Hi there everyone!
I'm trying to include Mobile-Detect in my PHP script and for some reason, it can't find the class.
PHP 8.3
source: https://github.com/serbanghita/Mobile-Detect/releases/tag/4.8.06
My code:
// Third party inclusion for mobile detection
require_once ('./includities/Mobile-Detect/MobileDetect.php');
$detect = new MobileDetect;
Inside MobileDetect.php:
class MobileDetect
{
/**
* A cache for resolved matches
* Implementation of PSR-16: Common Interface for Caching Libraries
* https://www.php-fig.org/psr/psr-16/
*
* Replace this with your own implementation.
*/
protected Cache $cache;
/**
* Stores the version number of the current release.
*/
protected string $VERSION = '4.8.06';
On pageload:
Error: Class "MobileDetect" not found
I've tried installing this via composer as well as the current(and previously successful) inclusion of the src code but for some reason, this time I can't get this to work at all. Reading the documentation, I've tried the various methods of calling this but nothing I've tried seems to work.
What am I fudging?