• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP mb_http_output函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中mb_http_output函数的典型用法代码示例。如果您正苦于以下问题:PHP mb_http_output函数的具体用法?PHP mb_http_output怎么用?PHP mb_http_output使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: put_category_autofill_to_db

 public function put_category_autofill_to_db($db, $cat)
 {
     mb_internal_encoding('UTF-8');
     mb_http_output('UTF-8');
     mb_http_input('UTF-8');
     echo '<pre>';
     //        $old_categorys = $db->get_categorys_from_db();
     //
     //        echo '<h2>vanhat</h2>';
     //
     //        var_dump($old_categorys);
     //
     //        echo '<h2>settareissa</h2>';
     //
     //        var_dump($xml_categorys);
     //
     //        $new_categorys = array_diff($xml_categorys, $old_categorys);
     echo '<h2>lisätään</h2>';
     $xml_categorys = $cat->autofillCategorys();
     var_dump($xml_categorys);
     foreach ($xml_categorys as $category) {
         $db->put_category_to_db($category);
         echo "\n";
     }
     echo '</pre>';
 }
开发者ID:TeeAaTeeUu,项目名称:risteily_ilmo2,代码行数:26,代码来源:install.php


示例2: initMbstring

 static function initMbstring()
 {
     if (extension_loaded('mbstring')) {
         if (((int) ini_get('mbstring.encoding_translation') || in_array(strtolower(ini_get('mbstring.encoding_translation')), array('on', 'yes', 'true'))) && !in_array(strtolower(ini_get('mbstring.http_input')), array('pass', '8bit', 'utf-8'))) {
             user_error('php.ini settings: Please disable mbstring.encoding_translation or set mbstring.http_input to "pass"', E_USER_WARNING);
         }
         if (MB_OVERLOAD_STRING & (int) ini_get('mbstring.func_overload')) {
             user_error('php.ini settings: Please disable mbstring.func_overload', E_USER_WARNING);
         }
         mb_regex_encoding('UTF-8');
         ini_set('mbstring.script_encoding', 'pass');
         if ('utf-8' !== strtolower(mb_internal_encoding())) {
             mb_internal_encoding('UTF-8');
             ini_set('mbstring.internal_encoding', 'UTF-8');
         }
         if ('none' !== strtolower(mb_substitute_character())) {
             mb_substitute_character('none');
             ini_set('mbstring.substitute_character', 'none');
         }
         if (!in_array(strtolower(mb_http_output()), array('pass', '8bit'))) {
             mb_http_output('pass');
             ini_set('mbstring.http_output', 'pass');
         }
         if (!in_array(strtolower(mb_language()), array('uni', 'neutral'))) {
             mb_language('uni');
             ini_set('mbstring.language', 'uni');
         }
     } else {
         if (!defined('MB_OVERLOAD_MAIL')) {
             extension_loaded('iconv') or static::initIconv();
             require __DIR__ . '/Bootup/mbstring.php';
         }
     }
 }
开发者ID:pyjac,项目名称:BSSB,代码行数:34,代码来源:Bootup.php


示例3: __construct

 public function __construct()
 {
     $this->mysql = new mysql();
     mb_internal_encoding('UTF-8');
     mb_http_output('UTF-8');
     mb_http_input('UTF-8');
 }
开发者ID:TeeAaTeeUu,项目名称:risteily_ilmo2,代码行数:7,代码来源:database.php


示例4: configureMBSettings

 /**
  * Configures mbstring settings
  */
 function configureMBSettings($charset)
 {
     $charset = _ml_strtolower($charset);
     $this->_charset = $charset;
     $this->_internal_charset = $charset;
     if (!$this->_mb_enabled) {
         // setting the codepage for mysql connection
         $this->_codepage = $this->getSQLCharacterSet();
         return;
     }
     // getting the encoding for post/get data
     if (_ml_strtolower(ini_get('mbstring.http_input')) == 'pass' || !ini_get('mbstring.encoding_translation')) {
         $data_charset = $charset;
     } else {
         $data_charset = ini_get('mbstring.internal_encoding');
     }
     $this->_internal_charset = 'UTF-8';
     mb_internal_encoding('UTF-8');
     mb_http_output($charset);
     if (!$this->_mb_output) {
         ob_start("mb_output_handler", 8096);
     }
     // setting the codepage for mysql connection
     $this->_codepage = $this->getSQLCharacterSet();
     // checking if get/post data is properly encoded
     if ($data_charset != $this->_internal_charset) {
         convertInputData($this->_internal_charset, $data_charset);
     }
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:32,代码来源:multilang_core.php


示例5: execute

 function execute()
 {
     $context =& $this->getContext();
     $controller = $context->getController();
     $user = $context->getUser();
     $request = $context->getRequest();
     $pagefile = ACS_PAGES_DIR . "index.html." . ACSMsg::get_lang();
     $lockfile = $pagefile . ".locked";
     // 静的ファイル書き換え中の場合(0.5秒待つ)
     if (is_readable($lockfile)) {
         usleep(500000);
     }
     // 書き換え中でなく、静的ファイルが存在する場合
     if (!is_readable($lockfile) && is_readable($pagefile)) {
         // 静的ファイル作成時間が有効時間範囲内の場合
         if (time() - filemtime($pagefile) <= ACS_PAGES_EFFECTIVE_SEC) {
             // 静的トップを標準出力
             mb_http_output('pass');
             readfile($pagefile);
             return;
         }
     }
     $request->setAttribute('force_realtime', 1);
     $controller->forward("Public", "Index");
 }
开发者ID:nkawa,项目名称:acs-git-test,代码行数:25,代码来源:StaticIndexAction.class.php


示例6: show_rss_content

function show_rss_content()
{
    global $xoopsConfig;
    include_once $GLOBALS['xoops']->path('class/template.php');
    $tpl = new XoopsTpl();
    $module = rmc_server_var($_GET, 'mod', '');
    if ($module == '') {
        redirect_header('backend.php', 1, __('Choose an option to see its feed', 'rmcommon'));
        die;
    }
    if (!file_exists(XOOPS_ROOT_PATH . '/modules/' . $module . '/rss.php')) {
        redirect_header('backend.php', 1, __('This module does not support rss feeds', 'rmcommon'));
        die;
    }
    $GLOBALS['xoopsLogger']->activated = false;
    if (function_exists('mb_http_output')) {
        mb_http_output('pass');
    }
    header('Content-Type:text/xml; charset=utf-8');
    include XOOPS_ROOT_PATH . '/modules/' . $module . '/rss.php';
    if (!isset($rss_channel['image'])) {
        $rmc_config = RMFunctions::configs();
        $rss_channel['image']['url'] = $rmc_config['rssimage'];
        $dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.png');
        $rss_channel['image']['width'] = $dimention[0] > 144 ? 144 : $dimention[0];
        $rss_channel['image']['height'] = $dimention[1] > 400 ? 400 : $dimention[1];
    }
    include RMTemplate::get()->get_template('rmc_rss.php', 'module', 'rmcommon');
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:29,代码来源:rss.php


示例7: run

 /**
  * Run an application
  */
 public static function run()
 {
     // Error reporting
     error_reporting(ENV === 'production' ? E_ERROR | E_WARNING | E_PARSE : -1);
     ini_set('display_errors', ENV === 'production' ? 0 : 1);
     // Services
     $services = Services::getInstance();
     // Global configuration
     $config = $services->config()->get('config');
     // UTF-8 support
     if (isset($config['utf8']) && $config['utf8']) {
         mb_internal_encoding('UTF-8');
         mb_http_output('UTF-8');
         mb_http_input('UTF-8');
         mb_language('uni');
         mb_regex_encoding('UTF-8');
         ob_start('mb_output_handler');
     } else {
         ob_start();
     }
     // Set Locales
     if (isset($config['locale']) && $config['locale']) {
         setlocale(LC_ALL, $config['locale']);
         setlocale(LC_NUMERIC, 'C');
     }
     // Call controller
     if ($route = $services->route()) {
         list($class, $method, $params) = $route;
         $controller = new $class();
         $controller->{$method}(...$params);
     }
     $services->output()->display(!$services->input()->isClient());
     ob_end_flush();
 }
开发者ID:sugatasei,项目名称:beerawecka,代码行数:37,代码来源:Bootstrap.php


示例8: boot

 /**
  * Boots the configuration module.
  *
  * @throws ModuleException If config file doesn't exist.
  * @param Application $application Calling application.
  * @return self
  */
 public function boot(Application $application = null) : Module
 {
     // calling the config module without any application makes no sense
     if (isset($application) === false) {
         throw new ModuleException('The configuration module is expected to run within an application.');
     }
     // check for available configuration files
     // $configs = new GenericDirectory($application->getConfigsPath());
     // try to locate configuration file for current running application
     $file = new GenericFile([$application->getConfigsPath(), 'config.json']);
     // try to read config file
     $config = FileConfig::create($file);
     // different internal character encoding given by config
     if ($config->has('charset')) {
         $charset = $config->get('charset');
         function_exists('mb_internal_encoding') && mb_internal_encoding($charset);
         function_exists('mb_http_output') && mb_http_output($charset);
     }
     // different timezone given by config
     if ($config->has('timezone')) {
         date_default_timezone_set($config->get('timezone'));
     }
     // keep instance
     $this->config = $config;
     return $this;
 }
开发者ID:johnnyos,项目名称:config,代码行数:33,代码来源:Bootstrap.php


示例9: myalbum_callback_after_stripslashes_local

 function myalbum_callback_after_stripslashes_local($text)
 {
     if (function_exists('mb_convert_encoding') && mb_internal_encoding() != mb_http_output()) {
         return mb_convert_encoding($text, mb_internal_encoding(), mb_detect_order());
     } else {
         return $text;
     }
 }
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:8,代码来源:myalbum_constants.php


示例10: output

 function output($html)
 {
     //HTMLに出力
     mb_internal_encoding("UTF-8");
     mb_http_output("UTF-8");
     ob_start("mb_output_handler");
     //	echo mb_convert_encoding($html, "SJIS", "UTF-8");
     echo $html;
 }
开发者ID:aim-web-projects,项目名称:kobe-chuoh,代码行数:9,代码来源:PC.class.php


示例11: setCharset

 /**
  * Sets the default charset to be used for everything
  */
 public function setCharset($charset = '')
 {
     if (!empty($charset) && is_string($charset)) {
         $charset = trim($charset);
         @mb_internal_encoding($charset);
         @mb_http_output($charset);
         @mb_http_input($charset);
         @mb_regex_encoding($charset);
     }
 }
开发者ID:rainner,项目名称:biscuit-php,代码行数:13,代码来源:Runtime.php


示例12: onInit

 /**
  * Fired on instantiate the module
  * At this point nothing from the module is loaded
  */
 public function onInit()
 {
     mb_detect_order(self::$encoding . ", UTF-8, UTF-7, ISO-8859-1, ASCII, EUC-JP, SJIS, eucJP-win, SJIS-win, JIS, ISO-2022-JP, Windows-1251, Windows-1252");
     mb_internal_encoding(self::$encoding);
     mb_http_input(self::$encoding);
     mb_http_output(self::$encoding);
     mb_language("uni");
     header("Content-Type: text/html; charset=" . self::$encoding);
     return $this;
 }
开发者ID:nonconforme,项目名称:nreeda,代码行数:14,代码来源:CHOQ.class.php


示例13: mobile_display

 function mobile_display($tempfile, $context = '')
 {
     if (is_array($context)) {
         extract($context);
     }
     mb_http_output("SJIS");
     ob_start("mb_output_handler");
     $tf = $_SERVER['DOCUMENT_ROOT'] . '/' . $this->template_dir;
     include $tf . $tempfile;
     ob_end_flush();
 }
开发者ID:aim-web-projects,项目名称:ueno-chuoh,代码行数:11,代码来源:Flame_Class.php


示例14: initialize

 public function initialize()
 {
     mb_internal_encoding('UTF-8');
     mb_http_output('UTF-8');
     mb_http_input('UTF-8');
     \common\classes\Error::initialize();
     \System\handler\ExceptionHandler::initialize();
     /**
      * @var $session Session
      */
     $session = \common\classes\Application::get_class(Session::class);
     $session->start();
 }
开发者ID:one-more,项目名称:peach_framework,代码行数:13,代码来源:system.php


示例15: set_mbstring

function set_mbstring($lang)
{
    // Internal content encoding = Output content charset (for skin)
    define('CONTENT_CHARSET', get_content_charset($lang));
    // 'UTF-8', 'iso-8859-1', 'EUC-JP' or ...
    // Internal content encoding (for mbstring extension)
    define('SOURCE_ENCODING', get_source_encoding($lang));
    // 'UTF-8', 'ASCII', or 'EUC-JP'
    mb_language(get_mb_language($lang));
    mb_internal_encoding(SOURCE_ENCODING);
    ini_set('mbstring.http_input', 'pass');
    mb_http_output('pass');
    mb_detect_order('auto');
}
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:14,代码来源:lang.php


示例16: apply

 public function apply()
 {
     if (function_exists('headers_sent') && headers_sent()) {
         throw new \RuntimeException("Failed to apply response: The headers have already " . "been sent out. You made some kind of output " . "before apply() has been called on the HTTP response");
     }
     if (function_exists('mb_http_output')) {
         $encoding = $this->getBody()->getContentEncoding();
         mb_http_output(strtoupper($encoding ? $encoding : 'UTF-8'));
         ob_start('mb_output_handler');
     }
     $this->applyHeadLine();
     $this->applyHeaders();
     $this->applyBody();
     return $this;
 }
开发者ID:talesoft,项目名称:tale-framework,代码行数:15,代码来源:Response.php


示例17: __construct

 /**
  * @param null $config
  *
  * @return TestApplication
  */
 public function __construct($config = null)
 {
     Craft::setApplication(null);
     clearstatcache();
     // SHOW EVERYTHING
     error_reporting(E_ALL & ~E_STRICT);
     ini_set('display_errors', 1);
     mb_internal_encoding('UTF-8');
     mb_http_input('UTF-8');
     mb_http_output('UTF-8');
     mb_detect_order('auto');
     // No matter how much you want to delete this line... DO NOT DO IT.
     Craft::$enableIncludePath = false;
     parent::__construct($config);
 }
开发者ID:kentonquatman,项目名称:portfolio,代码行数:20,代码来源:TestApplication.php


示例18: boot

 /**
  * Let's boot up the requested application!
  *
  * @param string $application Name of the application.
  */
 public static function boot(string $application)
 {
     // already booted?
     if (self::getBootTime()) {
         return;
     }
     // start stopping time
     self::$bootedAt = microtime(true);
     // set internal character encoding
     function_exists('mb_internal_encoding') && mb_internal_encoding('utf-8');
     function_exists('mb_http_output') && mb_http_output('utf-8');
     // sets the default timezone used by all date/time functions
     date_default_timezone_set('Europe/Berlin');
     // booted application
     self::$bootedApplication = ApplicationHandler::boot($application);
 }
开发者ID:johnnyos,项目名称:johnnyos,代码行数:21,代码来源:JohnnyOS.php


示例19: clean

function clean($string)
{
    mb_internal_encoding('UTF-8');
    mb_http_output('UTF-8');
    mb_http_input('UTF-8');
    if (is_array($string)) {
        foreach ($string as $key => $value) {
            $string[$key] = clean($value);
        }
        return $string;
    } else {
        if (strpos($string = htmlentities($string, ENT_QUOTES, 'UTF-8'), '&') !== false) {
            $string = html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);~i', '$1', $string), ENT_QUOTES, 'UTF-8');
        }
        return $string;
    }
}
开发者ID:TeeAaTeeUu,项目名称:risteily_ilmo2,代码行数:17,代码来源:helper.php


示例20: _header

 /**
  * Send the HTTP header
  *
  * @param	string  $filename
  *
  */
 protected function _header($filename)
 {
     if (function_exists('mb_http_output')) {
         mb_http_output('pass');
     }
     header('Content-Type: ' . $this->mimetype);
     if (preg_match("/MSIE ([0-9]\\.[0-9]{1,2})/", $_SERVER['HTTP_USER_AGENT'])) {
         header('Content-Disposition: attachment; filename="' . $filename . '"');
         header('Expires: 0');
         header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
         header('Pragma: public');
     } else {
         header('Content-Disposition: attachment; filename="' . $filename . '"');
         header('Expires: 0');
         header('Pragma: no-cache');
     }
 }
开发者ID:nao-pon,项目名称:impresscms,代码行数:23,代码来源:DownloadHandler.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP mb_internal_encoding函数代码示例发布时间:2022-05-15
下一篇:
PHP mb_http_input函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap