I'm using Composer to add Mustache in my PHP project.
On the local XAMPP environment all works pretty well. Uploading all on the remote web server raise up the error:
PHP Fatal error: Class 'Mustache_loader_FilesystemLoader' not found
This is my php script:
require 'vendor/autoload.php';
$mustache = new Mustache_Engine(array('loader'=> new Mustache_loader_FilesystemLoader('./templates')));
Someone said it's a case sensitive issue of the server's file system, but what gotta i do to fix it?
Thanks!
You're on a case-sensitive filesystem, so you need to use the proper case: Mustache_Loader_FilesystemLoader
not Mustache_loader_FilesystemLoader
.
You should always use the same case as the actual class name, even when you're not on a case-sensitive filesystem, because at some point you'll want to put it on another server and you'll run into this issue again :)