PHP包括:长路径问题 [英] PHP Include: Long Path Issue

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

问题描述

当我尝试包含长文件路径时,PHP包含无法加载。短包含路径可以正常工作。

When I try to include a long file path the PHP include fails to load. A short include path works fine.

例如,以下内容将失败:

For example, the following will fail:

../../contents/2010-St-Louis-Rams-Tickets-Season-Package-Includes-Tickets-For-All-Regular-Season-Home-Games/inc/title.inc

有谁知道问题出在哪里?

Does anyone have any idea where the problem could be?

推荐答案

请检查您的路径(包括驱动器名称等)是否超过260个字符。因为这是Windows的最大目录长度。 点击此处查看参考资料

Please check if your path (including drive name etc) exceeds 260 characters. Because that's the maximum directory length for Windows. Click here to see the reference.

该引用还指出,可以通过在路径名前加上\?\来创建超长路径名。这应该将最大路径长度扩展为32767个字符。但我不知道这是否可以在PHP中使用。

The reference also states that there is the possibility to create extra-long path names by prepending the path name with "\?\". That should expand the maximum path length to 32767 characters. But I have no idea if this can be used within PHP.

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

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