本文整理汇总了PHP中DatabaseHandler::getHost方法的典型用法代码示例。如果您正苦于以下问题:PHP DatabaseHandler::getHost方法的具体用法?PHP DatabaseHandler::getHost怎么用?PHP DatabaseHandler::getHost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DatabaseHandler
的用法示例。
在下文中一共展示了DatabaseHandler::getHost方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Execute
function Execute($sid, DatabaseHandler $dbHandler, $userId)
{
$inputData = $_POST;
try {
$queryEngine = new QueryEngine();
$queryEngine->simpleQuery->addSourceDBInfo($sid, $dbHandler->getHost(), $dbHandler->getPort(), $dbHandler->getUser(), $dbHandler->getPassword(), $dbHandler->getDatabase(), $dbHandler->getDriver(), $dbHandler->getIsImpoted(), $dbHandler->getLinkedServerName());
UtilsForWizard::processDataMatchingUserInputsStoreDB($sid, $inputData["dataMatchingUserInputs"]);
$queryEngine->simpleQuery->setSourceTypeBySid($sid, 'database');
$resultJson = new stdClass();
$resultJson->isSuccessful = true;
$resultJson->message = 'Success!';
echo json_encode($resultJson);
// If a dump file is uploaded, start importing data in the background.
if (isset($_SESSION["dump_file_{$sid}"])) {
ExecutionManager::callChildProcessToImportDumpFile($sid, $userId, $dbHandler, $_SESSION["dump_file_{$sid}"]);
}
unset($_SESSION["dump_file_{$sid}"]);
} catch (Exception $e) {
$resultJson = new stdClass();
$resultJson->isSuccessful = false;
$resultJson->message = $e->getMessage();
echo json_encode($resultJson);
}
}