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

PHP mb_http_input函数代码示例

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

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



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


示例16: var_dump

<?php

var_dump(mb_http_input());
var_dump(mb_http_output());
var_dump(mb_language());
var_dump(mb_preferred_mime_name("sjis-win"));
mb_regex_encoding("UTF-8");
var_dump(mb_regex_encoding());
var_dump(mb_regex_set_options());
var_dump(mb_regex_set_options("pz"));
var_dump(mb_regex_set_options());
开发者ID:badlamer,项目名称:hhvm,代码行数:11,代码来源:mb_misc.php


示例17: processRequest

 /**
  * Processes the request.
  *
  * @throws HttpException
  * @return null
  */
 public function processRequest()
 {
     // If this is a resource request, we should respond with the resource ASAP
     $this->_processResourceRequest();
     // If we're not in devMode, or it's a 'dontExtendSession' request, we're going to remove some logging routes.
     if (!$this->config->get('devMode') || craft()->isInstalled() && !$this->userSession->shouldExtendSession()) {
         $this->log->removeRoute('WebLogRoute');
         $this->log->removeRoute('ProfileLogRoute');
     }
     // Additionally, we don't want these in the log files at all.
     if (craft()->isInstalled() && !$this->userSession->shouldExtendSession()) {
         $this->log->removeRoute('FileLogRoute');
     }
     // If this is a CP request, prevent robots from indexing/following the page
     // (see https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag)
     if ($this->request->isCpRequest()) {
         HeaderHelper::setHeader(array('X-Robots-Tag' => 'none'));
     }
     // Validate some basics on the database configuration file.
     $this->validateDbConfigFile();
     // Process install requests
     $this->_processInstallRequest();
     // If the system in is maintenance mode and it's a site request, throw a 503.
     if ($this->isInMaintenanceMode() && $this->request->isSiteRequest()) {
         throw new HttpException(503);
     }
     // Check if the app path has changed.  If so, run the requirements check again.
     $this->_processRequirementsCheck();
     // These have been deprecated in PHP 6 in favor of default_charset, which defaults to 'UTF-8'
     // http://php.net/manual/en/migration56.deprecated.php
     if (version_compare(PHP_VERSION, '6.0.0') < 0) {
         // Now that we've ran the requirements checker, set MB to use UTF-8
         mb_internal_encoding('UTF-8');
         mb_http_input('UTF-8');
         mb_http_output('UTF-8');
     }
     mb_detect_order('auto');
     // Makes sure that the uploaded files are compatible with the current DB schema
     if (!$this->updates->isSchemaVersionCompatible()) {
         if ($this->request->isCpRequest()) {
             $version = $this->getVersion();
             $build = $this->getBuild();
             $url = "http://download.buildwithcraft.com/craft/{$version}/{$version}.{$build}/Craft-{$version}.{$build}.zip";
             throw new HttpException(200, Craft::t('Craft does not support backtracking to this version. Please upload Craft {url} or later.', array('url' => '[' . $build . '](' . $url . ')')));
         } else {
             throw new HttpException(503);
         }
     }
     // Set the edition components
     $this->_setEditionComponents();
     // isCraftDbMigrationNeeded will return true if we're in the middle of a manual or auto-update for Craft itself.
     // If we're in maintenance mode and it's not a site request, show the manual update template.
     if ($this->updates->isCraftDbMigrationNeeded() || $this->isInMaintenanceMode() && $this->request->isCpRequest() || $this->request->getActionSegments() == array('update', 'cleanUp') || $this->request->getActionSegments() == array('update', 'rollback')) {
         $this->_processUpdateLogic();
     }
     // If there's a new version, but the schema hasn't changed, just update the info table
     if ($this->updates->hasCraftBuildChanged()) {
         $this->updates->updateCraftVersionInfo();
     }
     // If the system is offline, make sure they have permission to be here
     $this->_enforceSystemStatusPermissions();
     // Load the plugins
     $this->plugins->loadPlugins();
     // Check if a plugin needs to update the database.
     if ($this->updates->isPluginDbUpdateNeeded()) {
         $this->_processUpdateLogic();
     }
     // If this is a non-login, non-validate, non-setPassword CP request, make sure the user has access to the CP
     if ($this->request->isCpRequest() && !($this->request->isActionRequest() && $this->_isSpecialCaseActionRequest())) {
         // Make sure the user has access to the CP
         $this->userSession->requireLogin();
         $this->userSession->requirePermission('accessCp');
         // If they're accessing a plugin's section, make sure that they have permission to do so
         $firstSeg = $this->request->getSegment(1);
         if ($firstSeg) {
             $plugin = $plugin = $this->plugins->getPlugin($firstSeg);
             if ($plugin) {
                 $this->userSession->requirePermission('accessPlugin-' . $plugin->getClassHandle());
             }
         }
     }
     // If this is an action request, call the controller
     $this->_processActionRequest();
     // If we're still here, finally let UrlManager do it's thing.
     parent::processRequest();
 }
开发者ID:kant312,项目名称:sop,代码行数:92,代码来源:WebApp.php


示例18: get_the_snippet

function get_the_snippet($length = 150)
{
    $html = '';
    if (get_the_excerpt()) {
        $html = get_the_excerpt();
    } else {
        $html = get_the_content('', false);
    }
    if ($html) {
        $html = strip_tags($html);
        if (strlen($html) > $length) {
            if (function_exists('mb_internal_encoding') && function_exists('mb_http_output') && function_exists('mb_http_input') && function_exists('mb_language') && function_exists('mb_regex_encoding')) {
                mb_internal_encoding('UTF-8');
                mb_http_output('UTF-8');
                mb_http_input('UTF-8');
                mb_language('uni');
                mb_regex_encoding('UTF-8');
            }
            $html = mb_substr($html, 0, $length) . '...';
        }
        $html = '<p class="snippet">' . $html . '</p>';
    }
    return $html;
}
开发者ID:bencet,项目名称:presszo,代码行数:24,代码来源:common-lib.php


示例19: mb_internal_encoding

<?php

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');
header('Content-type: application/javascript');
//// START UP
$token = '';
$action = $_GET['action'];
$output = $_GET['output'];
$callback = $_GET['callback'];
$key = $_GET['key'];
// TODO:STORE Access by key for analytics?
$results = null;
$dbs_book_codes = array("GN", "EX", "LV", "NU", "DT", "JS", "JG", "RT", "S1", "S2", "K1", "K2", "R1", "R2", "ER", "NH", "ET", "JB", "PS", "PR", "EC", "SS", "IS", "JR", "LM", "EK", "DN", "HS", "JL", "AM", "OB", "JH", "MC", "NM", "HK", "ZP", "HG", "ZC", "ML", "MT", "MK", "LK", "JN", "AC", "RM", "C1", "C2", "GL", "EP", "PP", "CL", "H1", "H2", "T1", "T2", "TT", "PM", "HB", "JM", "P1", "P2", "J1", "J2", "J3", "JD", "RV");
$osis_book_codes = array("Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg", "Ruth", "1Sam", "2Sam", "1Kgs", "2Kgs", "1Chr", "2Chr", "Ezra", "Neh", "Esth", "Job", "Ps", "Prov", "Eccl", "Song", "Isa", "Jer", "Lam", "Ezek", "Dan", "Hos", "Joel", "Amos", "Obad", "Jonah", "Mic", "Nah", "Hab", "Zeph", "Hag", "Zech", "Mal", "Matt", "Mark", "Luke", "John", "Acts", "Rom", "1Cor", "2Cor", "Gal", "Eph", "Phil", "Col", "1Thess", "2Thess", "1Tim", "2Tim", "Titus", "Phlm", "Heb", "Jas", "1Pet", "2Pet", "1John", "2John", "3John", "Jude", "Rev");
switch ($action) {
    case 'list':
        $results = get_list($_GET['force']);
        break;
    case 'books':
        $results = get_books($_GET['version']);
        break;
    case 'chapter':
        $results = get_chapter($_GET['version'], $_GET['sectionid'], $_GET['osis'], $_GET['chapter'], $_GET['dir'], $_GET['lang'], $_GET['lang3'], $_GET['previd'], $_GET['nextid'], $_GET['bookname']);
        break;
    case 'search':
        $results = get_search($_GET['version'], $_GET['text'], $_GET['divisions']);
开发者ID:kidaa,项目名称:uw-web,代码行数:31,代码来源:abs.php


示例20: ini_set

<?php

ini_set("display_errors", On);
error_reporting(E_ALL);
mb_language("uni");
mb_internal_encoding("utf-8");
mb_http_input("auto");
mb_http_output("utf-8");
require "constant.php";
$cont_id = $_POST['contribution_id'];
$reaction = $_POST['text'];
$user_id = $_POST['user_id'];
//$sql = "INSERT INTO user (name, facebook_id, img, univ, grad_year) VALUES('$name', $fb_id, '$img', '$univ', $grad_year)";
$sql = "INSERT INTO reaction (cont_id,  reaction, user_id, created_at) VALUES({$cont_id}, '{$reaction}', {$user_id}, now())";
$link = new mysqli("localhost", "{$db_usr}", "{$db_pwd}", "{$db_name}");
if (!mysqli_set_charset($link, "utf8")) {
    printf("Error loading character set utf8: %s\n", mysqli_error($link));
} else {
    printf("Current character set: %s\n", mysqli_character_set_name($link));
}
if ($link->query($sql)) {
} else {
    if (mysqli_connect_errno()) {
        printf("connect failed: %s\n", $link->connect_error());
        exit;
    }
}
mysqli_close($link);
开发者ID:saison,项目名称:recru,代码行数:28,代码来源:create_reaction.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP mb_http_output函数代码示例发布时间:2022-05-15
下一篇:
PHP mb_get_info函数代码示例发布时间: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