本文整理匯總了PHP中content::set方法的典型用法代碼示例。如果您正苦於以下問題:PHP content::set方法的具體用法?PHP content::set怎麽用?PHP content::set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類content
的用法示例。
在下文中一共展示了content::set方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getenv
$gaddress = "http://" . getenv("HTTP_HOST") . implode("/", $list) . "/";
$content = new content($gaddress, "install", "ru");
if (!isset($_GET["st"])) {
$content->out("index", "public", false);
} else {
switch ($_GET["st"]) {
//1 шаг. форма
case 1:
$dir = scandir("build");
$list = array();
foreach ($dir as $did => $name) {
if ($name != ".htaccess" && $name != "." && $name != "..") {
$list[$did] = $name;
}
}
$content->set("admlist", html_::select($list, "dirselect", 3, "style='width:173px'"))->out("step1", "public", false);
break;
//проверка коннекта
//проверка коннекта
case 2:
try {
if (!empty($_POST["conType"]) && !empty($_POST["db_host"]) && !empty($_POST["db_usr"]) && !empty($_POST["db_pwd"])) {
$conType = (int) $_POST["conType"];
$db = connect::start($conType, $_POST["db_host"], NULL, $_POST["db_usr"], $_POST["db_pwd"]);
$_SESSION["installmwcct"] = $conType;
$_SESSION["installmwcdb_host"] = $_POST["db_host"];
if (!empty($_POST["adb_name"])) {
$_SESSION["installamwcdb_name"] = $_POST["adb_name"];
}
$_SESSION["installmwcdb_usr"] = $_POST["db_usr"];
$_SESSION["installmwcdb_pwd"] = $_POST["db_pwd"];