如何使我的本地服务器区分大小写? [英] How can I make my local server case-sensitive?
问题描述
我使用的是 Windows Vista Home Premium 64 位操作系统.我使用 Apache Friends XAMPP 服务器作为我的本地主机.我开发 PHP、MySQL.
I'm on Windows Vista Home Premium 64 bit OS. I use Apache Friends XAMPP server as my localhost. And I develop PHP, MySQL.
问题是我的本地服务器可以容忍大小写错误,尤其是文件/文件夹名称.
The problem is my local server is tolerant of case mistakes, especially in file/folder names.
当我的服务器上运行的程序运行在 linux 服务器上时,定位和纠正所有大小写错误真的很头疼.
When that running program on my server goes on linux servers, it's really a headache to locate and correct all the case errors.
那么如何让我的本地服务器像在 linux 服务器中一样区分大小写?
So how can I make my local server case-sensitive as in linux servers?
推荐答案
不,你不能.PHP 文件处理依赖于底层 O.由于 Windows 是不区分大小写的操作系统,因此它无法处理具有不同大小写的文件.
No you can't. PHP file handling is dependant on the underlying O. Since Windows is a case-insensitive OS, it cannot handle files with a different case.
这不会改变,因为它会破坏很多应用程序.根据这篇 KB 文章,NTFS 是区分大小写的文件系统.
This won't change, as it will break a lot of applications. NTFS is a case-sensitive filesystem according to this KB article.
如果您有一台旧电脑,什么都不做,请在其上安装 Linux 服务器.或者,如果您有足够的资源 (RAM),请运行虚拟机(例如,使用 VirtualBox)
If you have an old PC doing nothing, install a Linux server on it. Or if you have enough resources (RAM), run a Virtual machine (with VirtualBox for example)
这篇关于如何使我的本地服务器区分大小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!