Zend_Loader_PluginLoader :: setIncludeFileCache()出现奇怪的未知错误

时间:2010-12-16 08:18:27

标签: php zend-framework

确定。这是我的代码:

    $classFileIncCache = BASE_PATH.'/public/cache/pluginLoaderCache.php';
    if (file_exists($classFileIncCache)) {
        include_once $classFileIncCache;
    }
    Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);  

现在,它工作得很好,除了,一个未知错误一直写入我的日志:

2010-12-16 09:11:05: Unknown error (ErrNo=2): include_once(Zend/Filter/Word\CamelCaseToDash.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /var/www/abcabc/abcabc.com/myapp/src/public/cache/pluginLoaderCache.php on line 9
2010-12-16 09:11:05: Unknown error (ErrNo=2): include_once() [<a href='function.include'>function.include</a>]: Failed opening 'Zend/Filter/Word\CamelCaseToDash.php' for inclusion (include_path='/var/www/abcabc/abcabc.com/lib/../thirdparty/src/Zend/library/:/var/www/abcabc/abcabc.com/lib/../myapp/src//library') in /var/www/abcabc/abcabc.com/myapp/src/public/cache/pluginLoaderCache.php on line 9

经过进一步调查,我发现缓存文件中的这一行有问题:

include_once 'Zend/Filter/Word\CamelCaseToDash.php';

所有其他行都是正确的,只有正斜杠,例如:

include_once 'Zend/View/Helper/HeadMeta.php';
include_once 'Zend/View/Helper/HeadLink.php';
include_once 'Zend/View/Helper/HeadScript.php';
include_once 'Zend/Controller/Action/Helper/ViewRenderer.php';
include_once 'Zend/Application/Resource/Frontcontroller.php';
include_once 'Zend/View/Helper/Doctype.php';

这是一个Zend Framework错误还是我的错误导致了这个错误?

1 个答案:

答案 0 :(得分:2)

我确实有这个。当我将文件从我的Windows机器FTP到我的Linux服务器时出现了。删除该文件,Zend将使用正确的目录分隔符重新创建它,如tawfeko建议的那样