dahil php dosyadan yankı const

0 Cevap

Ben bu gibi görünüyor "config.php" adında bir dosya var:

define("DB_NAME", "mydatabase")

başka bir dosya var:

defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
defined('SITE_ROOT') ? null : define('SITE_ROOT', 'C:'.DS.'inetpub'.DS.'wwwroot');
defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.DS.'lib');

require_once(LIB_PATH.DS.'config.php');
echo DB_NAME;

which outputs : PHP Notice: Use of undefined constant DB_NAME - assumed 'DB_NAME' in C:\inetpub\wwwroot\lib\initialize.php on line 27

If it helps at all this a new installation of php. PHP is working but there may be something I missed in the php.ini. I no there's just some small thing I'm missing but I can't figure it out. Anyone with any ideas?

0 Cevap