本文整理匯總了PHP中Setup::usersExist方法的典型用法代碼示例。如果您正苦於以下問題:PHP Setup::usersExist方法的具體用法?PHP Setup::usersExist怎麽用?PHP Setup::usersExist使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Setup
的用法示例。
在下文中一共展示了Setup::usersExist方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
if (substr($fileName, -4) == '.sql') {
if ($fileName == 'data.sql') {
continue;
}
if ($fileName == 'tables.sql') {
continue;
}
$backups[] = array('number' => sizeof($backups), 'filename' => $fileName);
}
}
$tmplData = array('backups' => $backups);
return $tmplData;
}
$setup = new Setup();
if (session_is_registered('userid')) {
$output->secure('admin');
$content = new tmpl('step_4.html');
} elseif (!$setup->mysqlConfigExists()) {
if ($setup->mysqlConfigWritable()) {
require_once 'DatabaseForm.php';
$databaseForm = new DatabaseForm();
$content = $databaseForm->getForm();
} else {
$content = new tmpl('step_1_prepare.html');
}
} elseif (!$setup->usersExist()) {
$content = new tmpl('step_2.html', list_backups());
} else {
$content = new tmpl('step_3.html');
}
$output->out($content);
示例2: Setup
<?php
/*
* This file is part of Infoschool - a web based school intranet.
* Copyright (C) 2009 Maikel Linke
*/
include 'var.php';
require_once 'Setup.php';
if (!isset($_POST['sql-script'])) {
exit;
}
$setup = new Setup();
if ($setup->usersExist()) {
exit;
}
$setup->insertData($_POST['sql-script']);
redirect('./');