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


PHP mb_http_input函数代码示例

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


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

示例1: __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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: __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

示例8: 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

示例9: dispatchLoopStartup

 public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
 {
     $front = Zend_Controller_Front::getInstance();
     $currentModule = $front->getRequest()->getModuleName();
     $registry = Zend_Registry::getInstance();
     $registry->session = Base_Helper_Session::getInstance();
     $appConfig = $front->getParam("bootstrap")->getOptions();
     $registry->appConfig = $appConfig;
     $registry->currentModule = $currentModule;
     $modulePaths = array();
     foreach ($front->getControllerDirectory() as $moduleName => $controllerPath) {
         $modulePaths[$moduleName] = dirname($controllerPath);
     }
     $registry->modulePaths = $modulePaths;
     $registry->controllerPaths = $front->getControllerDirectory();
     $logName = date('Y-m-d') . '.log';
     !is_dir(LOG_PATH) ? mkdir(LOG_PATH, 0777, TRUE) : NULL;
     $registry->logging = new Base_Php_Overloader();
     $registry->logging->logDir = LOG_PATH;
     $registry->logging->logName = $logName;
     Base_Helper_Log::getInstance()->setLogName($logName);
     if (PHP_VERSION_ID < 50600) {
         mb_http_input('UTF-8');
         mb_http_output('UTF-8');
         mb_internal_encoding('UTF-8');
         iconv_set_encoding('input_encoding', 'UTF-8');
         iconv_set_encoding('output_encoding', 'UTF-8');
         iconv_set_encoding('internal_encoding', 'UTF-8');
         iconv_set_encoding('internal_encoding', 'UTF-8');
     } else {
         ini_set('input_encoding', 'UTF-8');
         ini_set('output_encoding', 'UTF-8');
         ini_set('default_charset', 'UTF-8');
         ini_set('default_charset', 'UTF-8');
         //ini_set('mbstring.http_input', 'UTF-8');
         //ini_set('mbstring.http_output', 'UTF-8');
         //ini_set('mbstring.internal_encoding', 'UTF-8');
     }
     if ('base' != strtolower($currentModule)) {
         Base_Plugin_Module::init();
     }
     $class = ucfirst($currentModule) . '_Plugin_Module';
     call_user_func($class . '::init');
 }
开发者ID:HuyTran0424,项目名称:noeavrsev345452dfgdfgsg,代码行数:44,代码来源:Preparing.php

示例10: __construct

 public function __construct()
 {
     $this->dbhost = get_dbhost();
     $this->dbuser = get_dbuser();
     $this->dbpw = get_dbpw();
     $this->dbname = get_dbname();
     $this->dbsocket = get_dbsocket();
     $this->dbport = get_dbport();
     $this->etuliite = get_etuliite();
     mb_internal_encoding('UTF-8');
     mb_http_output('UTF-8');
     mb_http_input('UTF-8');
     if (empty($this->dbsocket)) {
         $this->local_db = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpw) or die;
         mysqli_select_db($this->local_db, $this->dbname) or die;
     } else {
         $this->local_db = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpw, $this->dbname, $this->dbport, $this->dbsocket) or die;
     }
 }
开发者ID:TeeAaTeeUu,项目名称:risteily_ilmo2,代码行数:19,代码来源:mysql.php

示例11: setLocale

 /**
  * @param $locale_head
  * @return string
  */
 static function setLocale($language, $region, $encoding)
 {
     if (self::$language != $language) {
         foreach (self::$domains as $domain) {
             self::resetDomain($domain);
         }
     }
     self::$language = $language;
     self::$region = $region;
     self::$encoding = $encoding;
     $locale = self::makeLocale($language, $region, $encoding);
     setlocale(LC_ALL, $locale);
     // set init encoding
     mb_language($language);
     mb_internal_encoding($encoding);
     mb_http_input($encoding);
     mb_http_output($encoding);
     return $locale;
 }
开发者ID:ateliee,项目名称:php_gettext_error,代码行数:23,代码来源:Localize.class.php

示例12: setEncoding

 public static function setEncoding($encoding = 'UTF-8', $language = null)
 {
     if ($language === null || !in_array($language, ['uni', 'Japanese', 'ja', 'English', 'en'], true)) {
         $language = 'uni';
     }
     switch (strtoupper($encoding)) {
         case 'UTF-8':
             if (extension_loaded("mbstring")) {
                 mb_internal_encoding($encoding);
                 mb_http_output($encoding);
                 mb_http_input($encoding);
                 mb_language($language);
                 mb_regex_encoding($encoding);
             } else {
                 throw new phpFastCacheCoreException("MB String need to be installed for Unicode Encoding");
             }
             break;
     }
 }
开发者ID:jigoshop,项目名称:Jigoshop2,代码行数:19,代码来源:Languages.php

示例13: construct

 /**
  * Constructor
  */
 public function construct()
 {
     mb_internal_encoding("UTF-8");
     mb_http_input("UTF-8");
     mb_http_output("UTF-8");
     if (!is_array($_SESSION[__CLASS__]['classes_versions'])) {
         $_SESSION[__CLASS__]['classes_versions'] = array();
     }
     $installedVersion = $this->getClassInstalledVersion(__CLASS__);
     if ($installedVersion != self::CLASS_VERSION) {
         $this->linker->db->updateQueries(__CLASS__);
         if (version_compare($installed_version, '1.1.11.03.28', '<')) {
             // We have to create the tables, because the insertion of the version is done at
             // the same time, so if there isn't a version, it is because the table doesn't exist.
             $this->db_execute('classes_installed_version_add_table', array());
             $this->db_execute('shared_methods_add_table', array());
         }
         if (version_compare($installed_version, '1.1.12.03.12', '<')) {
             $this->db_execute('create_table_datas_256', array());
         }
         $this->setClassInstalledVersion(__CLASS__, self::CLASS_VERSION);
     }
     return true;
 }
开发者ID:briceparent,项目名称:Shopsailors,代码行数:27,代码来源:sh_helper.cls.php

示例14: dirname

<?php

require dirname(__FILE__) . '/wp-config.php';
if (!defined('XOOPS_URL')) {
    $blog_charset = get_settings('blog_charset');
}
if (function_exists('mb_convert_encoding')) {
    if ($_charset != "" && (mb_http_input("P") == "" || strtolower(ini_get("mbstring.http_input")) == "pass")) {
        $_charset = strtoupper(trim($_charset));
    } else {
        $_charset = "auto";
    }
    if ($_charset == "auto") {
        $_charset = mb_detect_encoding($_POST['author'] . $_POST['comment'], $_charset);
    }
    $_POST['author'] = mb_convert_encoding($_POST['author'], $blog_charset, $_charset);
    $_POST['comment'] = mb_convert_encoding($_POST['comment'], $blog_charset, $_charset);
}
if (defined('XOOPS_URL')) {
    if (get_xoops_option(wp_mod(), 'wp_use_xoops_comments')) {
        return;
    }
    init_param('POST', 'author', 'string', '');
    init_param('POST', 'email', 'string', '');
    init_param('POST', 'url', 'string', '');
    init_param('POST', 'comment', 'html', '');
    init_param('POST', 'comment_post_ID', 'integer', '');
    init_param('POST', 'redirect_to', 'string', '');
    init_param('POST', 'action', 'string', '');
    init_param('POST', 'use_session', 'integer', '');
    $_author = get_param('author');
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:wp-ktai-comments-post.php

示例15: httpInput

 public function httpInput($type = 'I')
 {
     if (!is_string($type)) {
         return Error::set('Error', 'stringParameter', '1.(type)');
     }
     return mb_http_input($type);
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:7,代码来源:MB.php


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