Posted by Chris Shiflett on 08/26/05 05:36
Graham Anderson wrote:
> Is their some other reasonably safe way to call to the script outside
> the web folder?
Assuming you don't have too many hosts, a better way to write this:
> $brainPath = "/home/".$server."/includes/fonovisa.inc";
is to use a switch statement to make sure $server is valid:
switch($server)
{
case 'yourserver':
case 'another':
case 'yetanother':
$brain_path = "/home/$server/includes/fonovisa.inc";
break;
}
Something like that. :-)
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
[Back to original message]
|