wrong value from define

From: Date: Wed, 29 Dec 2004 12:37:30 +0000
Subject: wrong value from define
Groups: php.general 
Request: Send a blank email to php-general+get-205289@lists.php.net to get a copy of this message
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?

« previous php.general (#205289) next »