In order to understand an error following require_once() I’ve made a simple test script that throws the same error. Can someone please explain what’s not working?
[php] //…tstCMMDS.php…
echo date('l dS \of F Y h:i:s A ');
require_once("…/…/lib/php/cnnct2mysql.php");
//require_once works
[/php]
The error mssgs are …
PHP Notice: Use of undefined constant DB_PASSWORD - assumed ‘DB_PASSWORD’ in /home…/lib/php
/cnnct2mysql.php on line 9
PHP Notice: Use of undefined constant DB_HOST - assumed ‘DB_HOST’ in /home/…/lib/php/cnnct2mysql.php
on line 10
PHP Notice: Use of undefined constant DB_NAME - assumed ‘DB_NAME’ in /home/…/lib/php/cnnct2mysql.php
on line 11
The script for cnnct2mysql.php has these constants defined, as follows…
[php] // cnnct2mysql.php
DEFINE (DB_USR, “intelleckdb12”);
DEFINE (DB_PASSWORD, “xxxxxxxx”);
DEFINE (DB_HOST, “10.10.52.166”);
DEFINE (DB_NAME, “ntelleckdb”);
$db_connection = mysql_connect (DB_HOST, DB_USR, DB_PASSWORD);
mysql_select_db (DB_NAME);
[/php]
Apparently Define() doesn’t work as I’m using it.
I’m stuck. Help appreciated.
usit