本文整理匯總了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/";
}