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

PHP fix_get_params函数代码示例

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

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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