Lots of famous PHP scripts including WordPress use dirname(__FILE__).'/myParent.php'
instead of just 'myParent.php'
when including files in the same directory of the currently running script.
Aren't they the same thing? Why do you prefer typing more?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…