Is the using of 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/19 23:19 UTC
Read the original article Hit count: 122

Filed under:
|

looking at the code of Joomla I see that in the first line of the index, it defines the base path of installation with the dirname(FILE)

is this a font of possible risk for the site, I mean 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 ? Any idea is welcome.

Thanks

© Programmers or respective owner

Related posts about php

Related posts about security