当前位置: 首页>>代码示例>>PHP>>正文


PHP rex::getServerName方法代码示例

本文整理汇总了PHP中rex::getServerName方法的典型用法代码示例。如果您正苦于以下问题:PHP rex::getServerName方法的具体用法?PHP rex::getServerName怎么用?PHP rex::getServerName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rex的用法示例。


在下文中一共展示了rex::getServerName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: replaceVars

 static function replaceVars($template, $er = array())
 {
     $r = rex_extension::registerPoint(new rex_extension_point('YFORM_EMAIL_BEFORE_REPLACEVARS', ['template' => $template, 'search_replace' => $er, 'status' => false]));
     $template = $r['template'];
     $er = $r['search_replace'];
     $status = $r['status'];
     if ($status) {
         return true;
     }
     $er['REX_SERVER'] = rex::getServer();
     $er['REX_ERROR_EMAIL'] = rex::getErrorEmail();
     $er['REX_SERVERNAME'] = rex::getServerName();
     $er['REX_NOTFOUND_ARTICLE_ID'] = rex_article::getNotfoundArticleId();
     $er['REX_ARTICLE_ID'] = rex_article::getCurrentId();
     $template['body'] = rex_var::parse($template['body'], '', 'yform_email_template', $er);
     $template['body_html'] = rex_var::parse($template['body_html'], '', 'yform_email_template', $er);
     // rex_vars bug: sonst wird der Zeilenumbruch entfernt - wenn DATA_VAR am Ende einer Zeile
     if (rex_string::versionCompare(rex::getVersion(), '5.0.1', '<')) {
         $template['body'] = str_replace("?>\r", "?>\r\n\r", $template['body']);
         $template['body'] = str_replace("?>\n", "?>\n\r\n", $template['body']);
         $template['body_html'] = str_replace("?>\r", "?>\r\n\r", $template['body_html']);
         $template['body_html'] = str_replace("?>\n", "?>\n\r\n", $template['body_html']);
     }
     $template['body'] = rex_file::getOutput(rex_stream::factory('yform/email/template/' . $template['name'] . '/body', $template['body']));
     $template['body_html'] = rex_file::getOutput(rex_stream::factory('yform/email/template/' . $template['name'] . '/body_html', $template['body_html']));
     return $template;
 }
开发者ID:VIEWSION,项目名称:redaxo_yform,代码行数:27,代码来源:yform_email_template.php

示例2: getTitle

 public function getTitle()
 {
     $title_scheme = htmlspecialchars_decode(trim($this->domain->getTitle()));
     if ($title_scheme == '') {
         $title_scheme = self::$title_scheme_default;
     }
     $ytitle = '';
     if ($this->article && $this->article->getValue('yrewrite_title') != '') {
         $ytitle = $this->article->getValue('yrewrite_title');
     }
     if ($ytitle == '') {
         $ytitle = $this->article->getValue('name');
     }
     $title = $title_scheme;
     $title = str_replace('%T', $ytitle, $title);
     $title = str_replace('%SN', rex::getServerName(), $title);
     return $this->cleanString($title);
 }
开发者ID:tzfrs,项目名称:redaxo_yrewrite,代码行数:18,代码来源:seo.php

示例3: execute

 public function execute()
 {
     include_once rex_path::addon('import_export', 'functions/function_import_export.php');
     include_once rex_path::addon('import_export', 'functions/function_import_folder.php');
     $filename = $this->getParam('filename', self::DEFAULT_FILENAME);
     $filename = str_replace('%REX_SERVER', parse_url(rex::getServer(), PHP_URL_HOST), $filename);
     $filename = str_replace('%REX_VERSION', rex::getVersion(), $filename);
     $filename = strftime($filename);
     $file = $filename;
     $dir = getImportDir() . '/';
     $ext = '.sql';
     if (file_exists($dir . $file . $ext)) {
         $i = 1;
         while (file_exists($dir . $file . '_' . $i . $ext)) {
             ++$i;
         }
         $file = $file . '_' . $i;
     }
     if (rex_a1_export_db($dir . $file . $ext)) {
         $message = $file . $ext . ' created';
         if ($this->sendmail) {
             if (!rex_addon::get('phpmailer')->isAvailable()) {
                 $this->setMessage($message . ', mail not sent (addon "phpmailer" isn\'t activated)');
                 return false;
             }
             $mail = new rex_mailer();
             $mail->AddAddress($this->mailaddress);
             $mail->Subject = rex_i18n::msg('im_export_mail_subject');
             $mail->Body = rex_i18n::msg('im_export_mail_body', rex::getServerName());
             $mail->AddAttachment($dir . $file . $ext, $filename . $ext);
             if ($mail->Send()) {
                 $this->setMessage($message . ', mail sent');
                 return true;
             }
             $this->setMessage($message . ', mail not sent');
             return false;
         }
         $this->setMessage($message);
         return true;
     }
     $this->setMessage($file . $ext . ' not created');
     return false;
 }
开发者ID:skerbis,项目名称:redaxo,代码行数:43,代码来源:cronjob.php

示例4: rex_fragment

$fragment = new rex_fragment();
$fragment->setVar('content', $content, false);
$content = $fragment->parse('core/page/grid.php');
$fragment = new rex_fragment();
$fragment->setVar('title', rex_i18n::msg('system_features'));
$fragment->setVar('body', $content, false);
echo $fragment->parse('core/page/section.php');
$content = [];
$formElements = [];
$n = [];
$n['label'] = '<label for="rex-id-server">' . rex_i18n::msg('server') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-server" name="settings[server]" value="' . htmlspecialchars(rex::getServer()) . '" />';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="rex-id-servername">' . rex_i18n::msg('servername') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-servername" name="settings[servername]" value="' . htmlspecialchars(rex::getServerName()) . '" />';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="rex-id-error-email">' . rex_i18n::msg('error_email') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-error-email" name="settings[error_email]" value="' . htmlspecialchars(rex::getErrorEmail()) . '" />';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$content[] = $fragment->parse('core/form/form.php');
$elements = '';
$formElements = [];
$n = [];
$n['label'] = '<label for="rex-id-lang">' . rex_i18n::msg('backend_language') . '</label>';
$n['field'] = $sel_lang->get();
$formElements[] = $n;
$fragment = new rex_fragment();
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:system.settings.php

示例5:

<?php

/**
 * REDAXO customizer.
 *
 * Codemirror by : http://codemirror.net/
 * Marijn Haverbeke <marijnh@gmail.com>
 */
if (rex::isBackend() && rex::getUser()) {
    $config = $this->getConfig();
    rex_view::addCssFile($this->getAssetsUrl('css/styles.css'));
    if ($config['codemirror']) {
        rex_view::addCssFile($this->getAssetsUrl('vendor/codemirror/codemirror.css'));
        rex_view::addCssFile($this->getAssetsUrl('vendor/codemirror/theme/' . $config['codemirror_theme'] . '.css'));
        if ($config['codemirror_theme'] != '') {
            rex_view::setJsProperty('customizer_codemirror_defaulttheme', $config['codemirror_theme']);
        }
        rex_view::addJsFile($this->getAssetsUrl('vendor/codemirror/codemirror-compressed.js'));
    }
    if ($config['labelcolor'] != '') {
        rex_view::setJsProperty('customizer_labelcolor', $config['labelcolor']);
    }
    if ($config['showlink']) {
        rex_view::setJsProperty('customizer_showlink', '<h1 class="be-style-customizer-title"><a href="' . rex::getServer() . '" target="_blank">' . rex::getServerName() . '</a><i class="fa fa-external-link"></i></h1>');
    }
    rex_view::addJsFile($this->getAssetsUrl('js/main.js'));
}
开发者ID:staabm,项目名称:redaxo,代码行数:27,代码来源:boot.php

示例6: getPageTitle

 public static function getPageTitle()
 {
     $parts = [];
     $activePageObj = self::getCurrentPageObject();
     if ($activePageObj->getTitle()) {
         $parts[] = $activePageObj->getTitle();
     }
     if (rex::getServerName()) {
         $parts[] = rex::getServerName();
     }
     $parts[] = 'REDAXO CMS';
     return implode(' · ', $parts);
 }
开发者ID:skerbis,项目名称:redaxo,代码行数:13,代码来源:controller.php


注:本文中的rex::getServerName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。