为什么php报告“;未能打开流“;定义了目录分隔符


Why does php reports "failed to open stream" with Directory Separator Defined?

我有一个web目录,位于C:''examplep''htdocs''Dove''Subsebanks''drugs。我已经定义了目录分隔符。请说明由于脚本未运行而可能缺少的其他内容。感激

defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);  
defined('SITE_ROOT') ? null : define ('SITE_ROOT', $_SERVER['DOCUMENT_ROOT'].DS.'drugs');  
defined('LIB_PATH') ? null : define ('LIB_PATH',SITE_ROOT.DS.'includes');  
// load config file first   
require_once(LIB_PATH.DS."config.php");  
//load basic functions next so that everything after can use them  
require_once(LIB_PATH.DS."functions.php");  
require_once(LIB_PATH.DS."session.php");  
require_once(LIB_PATH.DS."tbldrugs.php");  
require_once(LIB_PATH.DS."tblmsg.php");  
require_once(LIB_PATH.DS."users.php");  

//Load Core objects  
require_once(LIB_PATH.DS."database.php");  
//load database-related classes  

谢谢。我刚刚从"如何使用DIRECTORY_SEPARATOR for Windows"上的一篇类似文章中找到了原因。我用纠正了SITE_ROOT的定义

 defined('SITE_ROOT') ? null : define('SITE_ROOT', 'C:'.DS.'xampp'.DS.'htdocs'.DS.'Dove'.DS.'Subsediaries'.DS.'drugs');

现在一切都很顺利。谢谢http://www.Stackoverflow.com!