douhuan5073 2015-03-14 18:26
浏览 114

找不到Mustache类Mustache_loader_FileSystemLoader

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!

  • 写回答

1条回答 默认 最新

  • dongliuzi3410 2015-03-15 00:08
    关注

    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 :)

    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭