时间:2021-07-01 10:21:17 帮助过:4人阅读
// Define the core paths // Define them as absolute paths to make sure that require_once works as expected // DIRECTORY_SEPARATOR is a PHP pre-defined constant // (\ for Windows, / for Unix) defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR); defined('SITE_ROOT') ? null : define('SITE_ROOT', dirname(__FILE__)); 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'); // load core objects require_once(LIB_PATH.DS.'session.php'); require_once(LIB_PATH.DS.'database.php'); // load database-related classes require_once(LIB_PATH.DS.'user.php'); |
http://www.bkjia.com/PHPjc/621603.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/621603.htmlTechArticle一个好的php代码,无论放到windows还是linux,不同版本的php上,都能正确的输出结果,才是一个好代码。 说起来容易的事,做起来并不是很轻...