date_default_timezone_set('Asia/Shanghai');//设置默认时区
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
define('PROJECT_PATH',realpath(dirname(__FILE__). '/'));
define('EBABY_APPLICATION_PATH',realpath(dirname(__FILE__) . '/application'));
echo 'APPLICATION_PATH==>'.APPLICATION_PATH.'<br>';//D:\zendServer\Zend\Apache2\htdocs\Ebaby3\application
echo 'APPLICATION_ENV==>'.APPLICATION_ENV.'<br>';//development
echo 'PROJECT_PATH==>'.PROJECT_PATH.'<br>';//D:\zendServer\Zend\Apache2\htdocs\Ebaby3
echo 'EBABY_APPLICATION_PATH==>'.EBABY_APPLICATION_PATH.'<br>';//D:\zendServer\Zend\Apache2\htdocs\Ebaby3\application
echo dirname(__FILE__).'<br>';//D:\zendServer\Zend\Apache2\htdocs\Ebaby3
echo $_SERVER['PHP_SELF'];// /Ebaby3
echo dirname($_SERVER['PHP_SELF']);///Ebaby3/index.php
exit;
index.php中定义一些全局变量的用法记录
最新推荐文章于 2021-11-30 19:30:31 发布