本文整理汇总了PHP中WebPage::output方法的典型用法代码示例。如果您正苦于以下问题:PHP WebPage::output方法的具体用法?PHP WebPage::output怎么用?PHP WebPage::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebPage
的用法示例。
在下文中一共展示了WebPage::output方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ReportErrorAndExit
function ReportErrorAndExit($sErrorMessage)
{
if (utils::IsModeCLI()) {
$oP = new CLIPage("iTop - Export");
$oP->p('ERROR: ' . $sErrorMessage);
$oP->output();
exit - 1;
} else {
$oP = new WebPage("iTop - Export");
$oP->p('ERROR: ' . $sErrorMessage);
$oP->output();
exit - 1;
}
}
示例2: output
/**
* Outputs (via some echo) the complete HTML page by assembling all its elements
*/
public function output()
{
//$this->set_base($this->m_sRootUrl.'pages/');
if (count($this->m_aReadyScripts) > 0) {
$this->add_script("\$(document).ready(function() {\n" . implode("\n", $this->m_aReadyScripts) . "\n});");
}
parent::output();
}
示例3: ReadMandatoryParam
require_once APPROOT . '/application/startup.inc.php';
function ReadMandatoryParam($oP, $sParam, $sSanitizationFilter = 'parameter')
{
$sValue = utils::ReadParam($sParam, null, true, $sSanitizationFilter);
if (is_null($sValue)) {
$oP->p("ERROR: Missing argument '{$sParam}'\n");
exit(29);
}
return trim($sValue);
}
/////////////////////////////////
// Main program
if (!utils::IsModeCLI()) {
$oP = new WebPage(Dict::S("TitleSynchroExecution"));
$oP->p("This page is used internally by iTop");
$oP->output();
exit - 2;
}
$oP = new CLIPage(Dict::S("TitleSynchroExecution"));
try {
utils::UseParamFile();
} catch (Exception $e) {
$oP->p("Error: " . $e->GetMessage());
$oP->output();
exit - 2;
}
// Next steps:
// specific arguments: 'csvfile'
//
$sAuthUser = ReadMandatoryParam($oP, 'auth_user', 'raw_data');
$sAuthPwd = ReadMandatoryParam($oP, 'auth_pwd', 'raw_data');