Newbie: Safe function call to a .inc file outside the web folder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I am relatively new to security....
Is the below reasonable safe ?

I have all of my main functions outside the web folder
I am including this function with every php script that accesses fonovisa.inc


function getBrain()
{
$temp = explode('.', $_SERVER['SERVER_NAME']); // returns 'www.myserver.com'
	$size = count($temp);
	$server = $temp[$size -2]; // returns 'myserver'
	$brainPath = "/home/".$server."/includes/fonovisa.inc";

	require_once($brainPath);
}


is this ok ?
Any help is appreciated :)
g

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux