p($sMessage); $oP->output(); exit; } function ReadMandatoryParam($oP, $sParam) { $sValue = utils::ReadParam($sParam, null, true /* Allow CLI */, 'raw_data'); if (is_null($sValue)) { ExitError($oP, "ERROR: Missing argument '$sParam'"); } return trim($sValue); } ///////////////////////////////// // Main program set_time_limit(0); if (utils::IsModeCLI()) { $oP = new CLIPage(GetOperationName()); SetupUtils::CheckPhpAndExtensionsForCli($oP); } else { $oP = new WebPage(GetOperationName()); } try { utils::UseParamFile(); } catch (Exception $e) { ExitError($oP, $e->GetMessage()); } ExecuteMainOperation($oP); $oP->output();