I've downloaded the latest version of Snoopy and have installed it on my local development environment here. For some reason the class is failing to instantiate; the following error is displayed:
Fatal error: Class 'Snoopy' not found in path/to/file.php on line 10
Line 10 in my code is where the class is called, like so
$snoopy = new Snoopy;
The Snoopy file is being included properly, as far as I can tell (no errors to say that the file is not being inlcluded and full path to the file is being used in the inlclude() call).
I've noticed that there's no constructor in the Snoopy class file, though, so I'm wondering if this has something to do with it.
Any ideas, anyone? Is there something blatantly obvious and stupid I'm missing here?
Apologies if this has also already been covered, I couldn't find any moention of it previously.
(Setup details if needed: Windows 7, running XAMPP, Apache 2.2.14, PHP 5.3.1, MySQL 5.1.41)
AFAIK include won’t error-die.
Use require to do this and make sure the script is only executed if it can include the file.