PHP区分大小写的路径问题 [英] PHP case sensitive path's issue

查看:454
本文介绍了PHP区分大小写的路径问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个 SocialEngine PHP应用程序,该应用程序最近已迁移到另一台服务器.

I am running a SocialEngine PHP application, which i've recently migrated to another server.

从那时起-出现问题:

SocialEngine的核心试图在不区分大小写的路径中包含文件, 似乎不存在(尽管在正确的情况下,它们确实存在)

The SocialEngine's core trying to include files in case insensitive paths, which appear not to exist (although, in the right case, they do exist)

如何使PHP/Apache变得更好,并且在其他情况下也进行搜索?

How can I make the PHP/Apache act nicer, and also search in other cases?

例如,SocialEngine查找/application/modules/Menuitems.php, 正确的路径是/application/modules/Menu**I**tems.php.

For example, the SocialEngine looks for /application/modules/Menuitems.php, and the right path is /application/modules/Menu**I**tems.php.

总结:我想要不区分大小写的路径!

To sum up: I want case-insensitive paths!

推荐答案

您在Windows中具有不区分大小写的路径.但是,当您将页面移至linux路径时,将区分大小写.您可以为构建路径创建函数,以将所有字母转换为大写或小写(通常是首选),并对目录名和文件名使用这些规范化的命名方式之一.

You have case insensitive paths in windows. But when you move your page to linux path will be case sensitive. You can make function for build path that convert all letters to uppercase or lowercase (often preferred) and use one of these normalized naming styles for directory- and file- names.

这篇关于PHP区分大小写的路径问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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