本文整理汇总了PHP中Constants::host方法的典型用法代码示例。如果您正苦于以下问题:PHP Constants::host方法的具体用法?PHP Constants::host怎么用?PHP Constants::host使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Constants
的用法示例。
在下文中一共展示了Constants::host方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
Constants::$host = self::$host;
Constants::$pass = self::$pass;
Constants::$user = self::$user;
Constants::$database = self::$database;
}
示例2:
static function initialize_server_constants()
{
Constants::$host = $_SERVER['HTTP_HOST'];
Constants::$document_root = $_SERVER['DOCUMENT_ROOT'];
Constants::$project_name = "piknik_ims";
Constants::$project_root = Constants::$document_root . "/" . Constants::$project_name;
Constants::$error_page = ' http://' . Constants::$host . '/' . Constants::$project_name . "/error.php";
Constants::$ip = $_SERVER['REMOTE_ADDR'];
}
示例3: init
public static function init()
{
Constants::$host = self::$host;
Constants::$pass = self::$pass;
Constants::$user = self::$user;
Constants::$database = self::$database;
UploadHandler::$projectFilesPath = ProjectGlobal::$projectFilesPath;
UploadHandler::$rootFilesPath = "/upload/generated_files/";
}