[英]Case sensitive for yii framework
我有一些來自yii的腳本,配置后會引發如下錯誤:
Alias "application.components.HFooter" is invalid. Make sure it points to an existing PHP file and the file is readable.
/var/www/rumah/framework/YiiBase.php(322)
310 if($isClass && (class_exists($className,false) || interface_exists($className,false)))
311 return self::$_imports[$alias]=$className;
312
313 if(($path=self::getPathOfAlias($alias))!==false)
314 {
315 if($isClass)
316 {
317 if($forceInclude)
318 {
319 if(is_file($path.'.php'))
320 require($path.'.php');
321 else
322 throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file and the file is readable.',array('{alias}'=>$alias)));
323 self::$_imports[$alias]=$className;
324 }
325 else
326 self::$classMap[$className]=$path.'.php';
327 return $className;
328 }
329 else // a directory
330 {
331 if(self::$_includePaths===null)
332 {
333 self::$_includePaths=array_unique(explode(PATH_SEPARATOR,get_include_path()));
334 if(($pos=array_search('.',self::$_includePaths,true))!==false)
它在Windows下運行良好,但在Linux下無法運行。 我懷疑原因與case sensitive
。 怎么解決呢? 謝謝。
檢入\\application\\components
目錄
並鍵入正確的fileaneme HFooter.php
application.components.HFooter
你是對的。 在Linux中,與Windows不同,文件和命令的名稱區分大小寫。 因此,要解決該問題,您可以重命名嘗試包含的文件,或者使用正確的大小寫鍵入filename。 在您的情況下,您應該檢查application.components.HFooter文件。 可能有名字smth。 像hfooter.php的Hfooter.php
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.