Is this coding standard safe ?
Posted: Thu Jan 17, 2008 11:36 am
I am helping my friend write a component and he has this line of code
Now it looks like he is using a server variable is that right to use a server variable or should he be using some thing like $mosConfig_absolute_path ? would the above work in a subdirectory ?
include_once( $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR .'administrator'. DIRECTORY_SEPARATOR .'components'. DIRECTORY_SEPARATOR .'com_devtest'. DIRECTORY_SEPARATOR .'devtest.config.php');
Now it looks like he is using a server variable is that right to use a server variable or should he be using some thing like $mosConfig_absolute_path ? would the above work in a subdirectory ?