需要 '/home/../http/' 与要求“/http/”一样快?
我知道在 php.ini 中包含文件时使用相对路径的性能很差。 但是,对于所有路径还是仅相对于假设(上下文)包含路径的路径都是如此?
这条线
require '/home/../http/test.php'
和这条线一样快吗
require '/http/test.php'
I know that it is poor performance to use relative paths when including a file in php. But, is this true for for all paths or just paths relative to the assumed (context) include path?
Is this line
require '/home/../http/test.php'
as fast as this line
require '/http/test.php'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不管怎样,一个有组织的结构远远超过了解析较长字符串所花费的小代价。
Either ways, an organized structure far out-weighs the small penalty spent on parsing a longer string.
基本上是的。 这些路径基本上首先由 php/apache 解析,然后由操作系统解析。
Basically yes. These paths are basically resolved first by php/apache then operating system.