我用鬍子爲我的項目,我跟隨它的文檔..這是..致命錯誤:類「Mustache_Engine」未找到
define('DS', DIRECTORY_SEPARATOR);
require 'system'.DS.'mustache'.DS.'Autoloader.php';
Mustache_Autoloader::register();
$m = new Mustache_Engine;
鬍子坐在system/mustache
文件夾中。有趣的是,它在Windows下工作得很好。但在我的服務器上(Ubuntu的12.04)它說Fatal error: Class 'Mustache_Engine' not found
。我的PHP和我的Windows一樣,所以我真的不明白這裏可能是什麼問題。所有的幫助表示讚賞。
你能夠顯示自動加載程序代碼嗎?如果它在一臺服務器上運行,但不是另一臺服務器,它可能與php設置「include_path」有關。 – 2013-04-21 02:24:02
它就在這裏:https://github.com/bobthecow/mustache.php/blob/master/src/Mustache /Autoloader.php – 2013-04-21 02:47:45