Question
Question about __FILE
Solution
define('ROOT', dirname(__FILE__));
Copy the code such as a file I created
Tested it
Direct __FI:E__ is
D:AppServwwwminlogtest.php
If again
require_once(ROOT.'/config.php');
That's not possible D:AppServwwwminlogtest.php./config
What is this result used for?
[ ]
Reference answer
dirname(__FILE__)=D:AppServwwwminlog
I really don’t know how you understand...
Do you think it’s useful????
Reference answer
D:AppServwwwminlogtest.php
The result I get is
representing the file name.
Reference answer
The original post was published by wodoe on 2009-1-3 23:20 [url=http://bbs.111cn.cn/redirect.php?goto=findpost&pid=814037&ptid=100295]Link tag [img]http://bbs. 111cn.cn/images/common/back.gif[/img][/url]
D:AppServwwwminlogtest.php
The result I get is the file name
Is your computer special? Impossible
echo dirname(__FILE__);
Reference answer
Sorry, the moderator will deduct my coins
Misunderstanding, just __FILE__ [img]http://www.111cn.cn/bbs/images/smilies/default/hug.gif[/img]