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


PHP fix_get_params函数代码示例

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


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

示例1: response

     * @param array  $headers
     *
     * @return \tripo\Filemanager\Response|\Illuminate\Http\Response
     */
    function response($content = '', $statusCode = 200, $headers = array())
    {
        $responseClass = class_exists('Illuminate\\Http\\Response') ? '\\Illuminate\\Http\\Response' : '\\tripo\\Filemanager\\Response';
        return new $responseClass($content, $statusCode, $headers);
    }
}
if (!function_exists('trans')) {
    // language
    if (!isset($_SESSION['RF']['language']) || file_exists($_SESSION['RF']['language_file']) === false || !is_readable($_SESSION['RF']['language_file'])) {
        $lang = $default_language;
        if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && $_GET['lang'] != '') {
            $lang = fix_get_params($_GET['lang']);
            $lang = trim($lang);
        }
        $language_file = dirname(dirname(__FILE__)) . '/lang/' . $default_language . '.php';
        if ($lang != $default_language) {
            $path_parts = pathinfo($lang);
            if (is_readable(dirname(dirname(__FILE__)) . '/lang/' . $path_parts['basename'] . '.php')) {
                $language_file = dirname(dirname(__FILE__)) . '/lang/' . $path_parts['basename'] . '.php';
            } else {
                echo "<script>console.log('The " . $lang . " language file is not readable! Falling back...');</script>";
            }
        }
        // add lang file to session for easy include
        $_SESSION['RF']['language'] = $lang;
        $_SESSION['RF']['language_file'] = $language_file;
    } else {
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:31,代码来源:utils.php

示例2: isset

        // add lang file to session for easy include
        $_SESSION['RF']['language'] = $lang;
        $_SESSION['RF']['language_file'] = $language_file;
    } else {
        $lang = $_SESSION['RF']['language'];
        $language_file = $_SESSION['RF']['language_file'];
    }
    require_once $language_file;
    if (!isset($_GET['type'])) {
        $_GET['type'] = 0;
    }
    if (!isset($_GET['field_id'])) {
        $_GET['field_id'] = '';
    }
    $field_id = isset($_GET['field_id']) ? fix_get_params($_GET['field_id']) : '';
    $type_param = fix_get_params($_GET['type']);
    $get_params = http_build_query(array('type' => $type_param, 'lang' => $lang, 'popup' => $popup, 'crossdomain' => $crossdomain, 'field_id' => $field_id, 'akey' => isset($_GET['akey']) && $_GET['akey'] != '' ? $_GET['akey'] : 'key', 'fldr' => ''));
    ?>

<!DOCTYPE html>
<html xmlns="https://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta name="robots" content="noindex,nofollow">
        <title>Responsive FileManager</title>
	<link rel="shortcut icon" href="img/ico/favicon.ico">
        <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" />
        <link href="css/bootstrap-lightbox.min.css" rel="stylesheet" type="text/css" />
开发者ID:PotsonHumer,项目名称:OGS_V2,代码行数:31,代码来源:dialog.php

示例3: someKarp

 public function someKarp()
 {
     require dirname(__FILE__) . '/Response.php';
     if (!function_exists('response')) {
         /**
          * Response construction helper
          *
          * @param string $content
          * @param int    $statusCode
          * @param array  $headers
          *
          * @return \Response|\Illuminate\Http\Response
          */
         function response($content = '', $statusCode = 200, $headers = array())
         {
             $responseClass = class_exists('Illuminate\\Http\\Response') ? '\\Illuminate\\Http\\Response' : 'Response';
             return new $responseClass($content, $statusCode, $headers);
         }
     }
     if (!function_exists('trans')) {
         // language
         if (!isset($_SESSION['RF']['language']) || file_exists($_SESSION['RF']['language_file']) === false || !is_readable($_SESSION['RF']['language_file'])) {
             $lang = $default_language;
             if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && $_GET['lang'] != '') {
                 $lang = fix_get_params($_GET['lang']);
                 $lang = trim($lang);
             }
             $language_file = dirname(dirname(__FILE__)) . '/lang/' . $default_language . '.php';
             if ($lang != $default_language) {
                 $path_parts = pathinfo($lang);
                 if (is_readable(dirname(dirname(__FILE__)) . '/lang/' . $path_parts['basename'] . '.php')) {
                     $language_file = dirname(dirname(__FILE__)) . '/lang/' . $path_parts['basename'] . '.php';
                 } else {
                     echo "<script>console.log('The " . $lang . " language file is not readable! Falling back...');</script>";
                 }
             }
             // add lang file to session for easy include
             $_SESSION['RF']['language'] = $lang;
             $_SESSION['RF']['language_file'] = $language_file;
         } else {
             $lang = $_SESSION['RF']['language'];
             $language_file = $_SESSION['RF']['language_file'];
         }
         $lang_vars = (include $language_file);
         if (!is_array($lang_vars)) {
             $lang_vars = array();
         }
         /**
          * Translate language variable
          *
          * @param $var string name
          *
          * @return string translated variable
          */
         function trans($var)
         {
             global $lang_vars;
             return array_key_exists($var, $lang_vars) ? $lang_vars[$var] : $var;
         }
     }
 }
开发者ID:Kingtreemonkey,项目名称:FileManager,代码行数:61,代码来源:Utility.php


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