windows大小写不敏感导致的autoload失败
最近在写一个接口的自动化框架,在本地好好的(windows),一放到服务端(centos)就各种报class 不存在,
而且本地小写的文件夹,如
“serviceFactory”到了服务端可能会变成“ServiceFactory”,当然也有可能保持不变。
方案
- 设置git大小写敏感
$ git config core.ignorecase false
- 删除文件再添加
$ git rm code/library/BuildTag*.php; git status
On branch master
Changes to be committed:
(use "git reset HEAD ..." to unstage)
deleted: code/library/BuildTagAfc.php
deleted: code/library/BuildTagAfs.php
rock@ROCK-PC /d/WampServer/www/hexu.org/code (dev)
$ git add code/library/BuildTag*.php; git status
On branch master
Changes to be committed:
(use "git reset HEAD ..." to unstage)
renamed: code/library/BuildTagAfc.php -> code/library/BuildTagafc.php
renamed: code/library/BuildTagAfs.php -> code/library/BuildTagafs.php