[PHP] mklink 与 dirname(__FILE__)的问题

2015-01-31 20:03:06 +08:00
 gdtv
windows8系统,apache+mysql+php网站,真实文件放在 E:\www
用mklink建立链接:
mklink /j D:\www E:\www

httpd.conf设置网站目录:
DocumentRoot "D:\www"

在该网站里用dirname(__FILE__)获取到的路径是 E:\www,
请问怎样才能让dirname(__FILE__)获取到的是D:\www呢? 是不是我的mklink命令写错了?
1871 次点击
所在节点    问与答
1 条回复
cnwggu
2015-01-31 21:24:16 +08:00
__FILE__ The full path and filename of the file with symlinks resolved. If used inside an include, the name of the included file is returned.

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/167105

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX