jpt62089
06-22-2005, 06:31 AM
is it good/safe to strucure the config file that defines db connectios (like host, user, pass, etc) like this:
<?php
$dbinfo = array(
'host' => 'localhost',
'dbname' => 'project',
'user' => 'user',
'pass' => 'pass'
)
?>
and when I want to call those I will type (using host as ex.):
<?php
echo $dbinfo['host'];
?>
is this very secure? or is just regular variables safer?
<?php
$dbinfo = array(
'host' => 'localhost',
'dbname' => 'project',
'user' => 'user',
'pass' => 'pass'
)
?>
and when I want to call those I will type (using host as ex.):
<?php
echo $dbinfo['host'];
?>
is this very secure? or is just regular variables safer?