i have config.php file
<?php
define(DBHOST, 'localhost');
define(DBNAME, 'new_shop_site');
define(DBUSER, 'root');
define(DBPASS, '');
?>
i try to get value of thes file in my database.php file
database.php i try 1
<?php
class database{
include_once("config/config.php");
/*database credentials*/
private static $host = DBHOST;
private static $username = DBUSER;
private static $pass = DBPASS;
private static $dbname = DBNAME;
}
?>
then try 2
<?php
include_once("config/config.php");
class database{
/*database credentials*/
private static $host = DBHOST;
private static $username = DBUSER;
private static $pass = DBPASS;
private static $dbname = DBNAME;
}
?>
but not working. how i get this value?