Security with dbHost, dbUser, dbPassword

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

 



What is the usual save way to store/use DB access info in a script. I currently just use some PHP variables in a file which I include in all other scripts.

config.php
<?PHP
  if (!defined ("config_include")) die ("Error...");
  $dbhost = "localhost";
  $dbuser = "name";
  $dbpass = "password";
  $dbname = "database";
  $dbcoll = "utf8_unicode_ci";
?>

Is this save enough or are there better ways? Where should I store this file so it isn't accessible via the net but inside scripts?

O. Wyss

--
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