Is using dirname(__FILE__) a good practice?
Posted
by
webose
on Programmers
See other posts from Programmers
or by webose
Published on 2012-10-19T23:10:31Z
Indexed on
2012/10/20
5:21 UTC
Read the original article
Hit count: 186
Looking at the code of Joomla I see that in the first line of the index, it defines the base path of installation with dirname(__FILE__)
.
Is this a possible risk for the site? If a non controlled error message show the internal path of the Joomla directory, because of, for example a failed include, can it be used to perform some kind of attack to the site? If yes, is it convenient to use this function?
© Programmers or respective owner