我可以强制Apache和PHP使用小写/大写文件名吗? [英] Can I force Apache and PHP to use lowercase/uppercase filenames?

查看:57
本文介绍了我可以强制Apache和PHP使用小写/大写文件名吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows下进行开发,需要在我的PHP项目中使用大写/小写文件名.是否有某种方法可以强制Apache + PHP(XAMPP)尊重上位&文件名中的小写字符?我的生产服务器是Linux,因此我总是会遇到一些无法正常工作的链接.

I am developing under Windows and need to use upper/lowercase filenames in my PHP project. Is there some way to force Apache+PHP (XAMPP) to respect difference between upper & lowercase characters in filenames? My production server is Linux, so I always end up with some links not working.

推荐答案

这不是Apache或PHP问题.您正在运行Windows,因此您可能正在使用NTFS作为硬盘驱动器上的文件系统.默认情况下,NTFS不区分大小写.这意味着您不能同时拥有"myfile.txt"和"mYfIlE.tXt".

This is not an Apache or PHP issue. You're running Windows, so you're probably using NTFS as the file system on your hard drive. NTFS is, by default, case insensitive. That means that you can't have both "myfile.txt" and "mYfIlE.tXt".

显然,您可以更改.我不会(希望大小写不敏感的软件可能会损坏).

Apparently, you can change this. I wouldn't (software that expects case insensitivity may break).

运行装有Linux的虚拟机.将其用作开发服务器.

Run a virtual machine with Linux on it. Use that as your development server.

这篇关于我可以强制Apache和PHP使用小写/大写文件名吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆