Hi,
in the following code, i want to get a constant value from config.php. I
don't receive the value, that is defined, but the name of the constant.
I tested the defines in config.php by echoing all defines, and it was
allright, so i'm quite confused why it doesn't work here.
That's my piece of code (which is in a class in a file which is in the same
dir as config.php):
function reg($name, $pw, $ally, $act) {
include('config.php');
echo(DB_SERV_NAME . '<br>');
$dbp = mysql_connect(DB_SERV_NAME, DB_USR_NAME, DB_PW);
if(!$dbp) die ("MySQL-Fehler");
Thats my error message:
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL Server Host
'DB_SERV_NAME' (11001) in
C:\apachefriends\xampp\htdocs\alliance\script\cl.member.php on line 34
MySQL-Fehler
Normally, i should get 'localhost'.
Anyone who can help me?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php