本文整理汇总了PHP中DOM::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP DOM::Load方法的具体用法?PHP DOM::Load怎么用?PHP DOM::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOM
的用法示例。
在下文中一共展示了DOM::Load方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SPrintF
</BODY>
</HTML>
EOD;
#-----------------------------------------------------------------------------
return SPrintF($Parse, $UniqID, $UniqID);
}
#-------------------------------------------------------------------------------
# Формирование списка отчетов
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
#-------------------------------------------------------------------------------
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'Administrator/AddIns'));
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Дополнения → Статистика → Общая статистика');
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY');
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tab', 'Administrator/Statistic', $NoBody);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
示例2: Links
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$_COOKIE['IsManaged'] = 'yes';
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load(XML_HTTP_REQUEST ? 'Window' : 'Main'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Регистрация в биллинговой системе');
#-------------------------------------------------------------------------------
$Script = new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Pages/UserRegister.js}'));
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', $Script);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/PasswordCheck.js}')));
#-------------------------------------------------------------------------------
$DOM->AddAttribs('Body', array('onload' => 'PasswordMode();'));
#-------------------------------------------------------------------------------
$Form = new Tag('FORM', array('name' => 'UserRegisterForm', 'onsubmit' => 'return false;'));
示例3: array
#-------------------------------------------------------------------------------
$DSScheme = array('GroupID' => 1, 'UserID' => 1, 'Name' => 'DedicOne', 'PackageID' => 'd1', 'CostDay' => 100, 'CostMonth' => 3000, 'CostInstall' => 300, 'ServerID' => 1, 'IsActive' => TRUE, 'IsBroken' => FALSE, 'IsProlong' => TRUE, 'MinDaysPay' => 31, 'MinDaysProlong' => 14, 'MaxDaysPay' => 1460, 'MaxOrders' => 0, 'MinOrdersPeriod' => 0, 'SortID' => 10, 'CPU' => '2x Opteron 2GHz, 2 ядра', 'ram' => 2048, 'raid' => '3Ware 9650SE-4LPML, 256Mb cache', 'disks' => 'SATA 500Gb + SATA 500Gb', 'chrate' => 8, 'trafflimit' => 1000, 'traffcorrelation' => '1:4', 'OS' => 'FreeBSD 10.1', 'UserNotice' => 'Идеальный сервер для высоконагруженного проекта ...', 'AdminNotice' => 'второй диск скоро посыпется, надо заменить');
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Messages = Messages();
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Window'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Title = $DSSchemeID ? SPrintF('Редактирование тарифа "%s"', $DSScheme['Name']) : 'Добавление нового выделенного сервера';
#-------------------------------------------------------------------------------
$DOM->AddText('Title', $Title);
#-------------------------------------------------------------------------------
$Table = array('Общая информация');
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Owner', 'Владелец тарифа', $DSScheme['GroupID'], $DSScheme['UserID']);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
示例4: Round
return ERROR | @Trigger_Error(500);
case 'exception':
return ERROR | @Trigger_Error(400);
case 'array':
$Replace['Customer'] = $Profile['Attribs'];
break;
default:
return ERROR | @Trigger_Error(101);
}
}
#---------------------------------------------------------------
$Summ = Round($Result['Summ'], 2);
#---------------------------------------------------------------
$DOM = new DOM();
#---------------------------------------------------------------
if (Is_Error($DOM->Load('WorksComplite/Reports/Template'))) {
return ERROR | @Trigger_Error(500);
}
#---------------------------------------------------------------
$Adding = System_Read(SPrintF('templates/WorksComplite/Reports/Head.%s.xml', $Contract['IsUponConsider'] ? 'Upon' : 'Use'));
if (Is_Error($Adding)) {
return ERROR | @Trigger_Error(500);
}
#---------------------------------------------------------------
$DOM->AddHTML('Body', $Adding, TRUE);
#---------------------------------------------------------------
$Executor = DB_Select('Profiles', 'TemplateID', array('UNIQ', 'ID' => 100));
#---------------------------------------------------------------
switch (ValueOf($Executor)) {
case 'error':
return ERROR | @Trigger_Error(500);
示例5: DOM
return NULL;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
case 'array':
break;
default:
return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Standard'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Clauses/Load', $New['ID']);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddText('Title', $Comp['Title']);
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', new Tag('TABLE', array('width' => 400), new Tag('TR', new Tag('TD', $Comp['DOM']))));
#-------------------------------------------------------------------------------
$Out = $DOM->Build();
#-------------------------------------------------------------------------------
if (Is_Error($Out)) {
示例6: gException
#-------------------------------------------------------------------------------
if (XML_HTTP_REQUEST) {
return new gException('PAGE_NOT_FOUND', 'Страница не найдена [404]');
}
#-------------------------------------------------------------------------------
if (Is_Error(System_Load('classes/DOM.class.php'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
#-------------------------------------------------------------------------------
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Main'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Страница не найдена [404]');
#-------------------------------------------------------------------------------
$DOM->AddHTML('Into', TemplateReplace('www.404'));
#-------------------------------------------------------------------------------
$Out = $DOM->Build();
#-------------------------------------------------------------------------------
if (Is_Error($Out)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
return $Out;
#-------------------------------------------------------------------------------
示例7: DOM
if (Is_Error(System_Load('classes/DOM.class.php'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Clauses/Load', $ClauseID, TRUE, $Preview);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load(XML_HTTP_REQUEST ? 'Window' : ($TemplateID ? $TemplateID : 'Main')))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddText('Title', $Comp['Title']);
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Comp['DOM']);
#-------------------------------------------------------------------------------
$Out = $DOM->Build(!XML_HTTP_REQUEST);
#-------------------------------------------------------------------------------
if (Is_Error($Out)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
return XML_HTTP_REQUEST ? array('Status' => 'Ok', 'DOM' => $DOM->Object) : $Out;
#-------------------------------------------------------------------------------
示例8: Tag
foreach ($Files as $File) {
$Title->AddChild(new Tag('LI', new Tag('A', array('href' => SPrintF('%s.html', BaseName($File))), BaseName($File))));
}
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Title);
#-------------------------------------------------------------------------------
$Out = $DOM->Build();
#-------------------------------------------------------------------------------
$IsWrite = IO_Write(SPrintF('%s/FileList.html', $JBsDocPath), $Out, TRUE);
if (Is_Error($IsWrite)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('JBsDoc'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('src' => 'Dictionary.js')));
#-------------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('src' => 'Search.js')));
#-------------------------------------------------------------------------------
$DOM->AddAttribs('Body', array('onLoad' => 'Refresh();'));
#-------------------------------------------------------------------------------
$Parse = <<<EOD
<TABLE class="Standard" cellspacing="5" cellpadding="5" width="100%" height="100%">
<TR>
<TD colspan="2">
<IMG src="http://www.joonte.com/styles/joonte/Images/TopLogo.png" />
</TD>