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


PHP Host::current方法代码示例

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


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

示例1: invia_commento

 function invia_commento()
 {
     try {
         $nome = Params::get("nome");
         $subject = Params::get("subject");
         $email = Params::get("email");
         $testo = Params::get("testo");
         //$codice_hidden = Params::get("codice_hidden");
         //$codice = Params::get("codice");
         //if ($codice_hidden!=$codice)
         //    throw new InvalidParameterException("Il codice non e' impostato correttamente!!");
         if ($nome != null && $subject != null && $email != null && $testo != null && isset(Config::instance()->EMAIL_COMMENT_RECEIVED)) {
             $e = new EMail("no_reply@" . Host::current_no_www(), Config::instance()->EMAIL_COMMENT_RECEIVED, "[Nuova commento da : " . $nome . "] - " . Host::current(), EMail::HTML_FORMAT);
             $e->render_and_send("include/messages/mail/alert/" . Lang::current() . "/nuovo_commento.php.inc", array("nome" => $nome, "email" => $email, "subject" => $subject, "testo" => $testo));
             return Redirect::success();
         } else {
             if (!isset(Config::instance()->EMAIL_COMMENT_RECEIVED)) {
                 throw new InvalidDataException("Il parametri di configurazione EMAIL_COMMENT_RECEIVED non e' impostato correttamente!!");
             } else {
                 throw new InvalidDataException("I dati immessi nella form non sono validi!!");
             }
         }
     } catch (Exception $ex) {
         Flash::error($ex->getMessage());
         return Redirect::failure();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:27,代码来源:CommentiController.class.php

示例2: check_domain

 private static function check_domain($domains)
 {
     foreach ($domains as $d) {
         if (Host::current() === $d) {
             return true;
         }
     }
     return false;
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:9,代码来源:Snippet.class.php

示例3: isLocal

 static function isLocal()
 {
     $current_host = Host::current();
     if (strstr($current_host, ".") === false) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:9,代码来源:Host.class.php

示例4: Array

<?php

// this must be the very first line in your PHP file!
/* This software is released under the BSD license. Full text at project root -> license.txt */
require_once "../../../framework/init.php";
require_once "framework/core/lib/controller/AbstractController.class.php";
DB::openDefaultConnection();
// You can't simply echo everything right away because we need to set some headers first!
$output = '';
// Here we buffer the JavaScript code we want to send to the browser.
$delimiter = "\n";
// for eye candy... code gets new lines
$output .= 'var tinyMCEFileList = new Array(';
$all_documenti = call("documenti", "index", array("__filter_folder__EQUAL" => $_GET["folder"]));
$server_path = "http://" . Host::current();
// Since TinyMCE3.x you need absolute image paths in the list...
if (count($all_documenti) > 0) {
    foreach ($all_documenti as $doc) {
        $output .= $delimiter . '["' . utf8_encode($doc["nome"]) . '", "' . utf8_encode($server_path . $doc["save_folder"] . $doc["hash_name"]) . '"],';
    }
    $output = substr($output, 0, -1);
    // remove last comma from array item list (breaks some browsers)
}
$output .= $delimiter;
DB::closeConnection();
// Finish code: end of array definition. Now we have the JavaScript code ready!
$output .= ');';
// Make output a real JavaScript file!
header('Content-type: text/javascript');
// browser will now recognize the file as a valid JS file
// prevent browser from caching
开发者ID:mbcraft,项目名称:frozen,代码行数:31,代码来源:document_list_js.php

示例5:

<html>
    <head>
        <title><?php 
echo Host::current();
?>
</title>
    </head>
    <body>
        <br />
        <br />
        <div align="center">
            <h2>Sito web in fase di manutenzione</h2>
        </div>
    </body>
</html>
开发者ID:mbcraft,项目名称:frozen,代码行数:15,代码来源:maintenance_in_progress.layout.php

示例6: testGet

 function testGet()
 {
     $url = "http://" . Host::current() . "/framework/core/tests/utils/http_test/input/hello.php";
     $result = Http::get($url);
     $this->assertEqual("Hello!", $result, "Il risultato ritornato non corrisponde!!");
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:6,代码来源:http_test.php

示例7: alert

 public static function alert($app_name, $alert_title)
 {
     $e = new EMail("alert@" . Host::current(), "info@frostlab.it", "[" . $app_name . "] - " . $alert_title, EMail::HTML_FORMAT);
     $e->render_and_send("framework/core/messages/alert/alert.php.inc", array("app_name" => $app_name, "alert_title" => $alert_title));
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:5,代码来源:EMail.class.php

示例8: autoconfigure

 protected function autoconfigure()
 {
     $this->scan_from_site_root("/include/config/__common/");
     $this->scan_from_site_root("/include/config/" . Host::current() . "/");
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:5,代码来源:AppIniConfigLoader.class.php

示例9: array

<?php

$supported_languages = array("it", "en");
$default_language = "it";
if (isset($_GET["lang"])) {
    Language::setCurrent($_GET["lang"]);
}
$current_lang = Language::getCurrent();
$current_host = Host::current();
header("Location: http://" . $current_host . "/" . $current_lang . "/index.php");
//require_once("include/portfolio.php");
//probe_portfolio_ping("65632473556990386535131");
开发者ID:mbcraft,项目名称:frozen,代码行数:12,代码来源:index.page.php


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