zoukankan      html  css  js  c++  java
  • 插件

    今天又安装了2个插件,一个是tag  一个是jsformat  其中tag 是手动安装,安装包已经放到云盘。 直接把安装包放到 C:Documents and SettingsAdministratorApplication DataSublime Text 2Packages  重启即可。

    2014年3月18日 14:50:06

    中文参数的问题解决了,编写覆盖CI核心类

    放在目录为:application/core/下面

    <?php
    
    /**
     * 2014年3月18日 14:13:36
     * 解决中文参数的问题,避免CI过滤
     */
     
    class MY_URI extends CI_URI {
     
        function _filter_uri($str) {
           /* $encoding = mb_detect_encoding($str, "gb2312,utf-8");
            if ($encoding != "utf-8") {
                $str = iconv($encoding, "utf-8", $str);
            }
            */
            if ($str != '' && $this->config->item('permitted_uri_chars') != '' && $this->config->item('enable_query_strings') == FALSE) {
                // preg_quote() in PHP 5.3 escapes -, so the str_replace() and addition of - to preg_quote() is to maintain backwards
                // compatibility as many are unaware of how characters in the permitted_uri_chars will be parsed as a regex pattern
                if (!preg_match($this->config->item('permitted_uri_chars'), $str)) {
                    show_error('myurl:The URI you submitted has disallowed characters.' . $str, 400);
                }
            }
            // Convert programatic characters to entities
            $bad = array('$', '(', ')', '%28', '%29');
            $good = array('$', '(', ')', '(', ')');
     
            return str_replace($bad, $good, $str);
        }
     
    }
     
    核心类
     
    修改配置文件中 $config['permitted_uri_chars'] = '|^[a-z 0-9~%.:_+- x{4e00}-x{9fa5}]+$|iu';
    QQ:540045865 热爱生活,热爱编程。
  • 相关阅读:
    struts总结
    struts的MVC详细实现
    struts的由来
    Hibernate的搭建及使用
    Hibernate简介
    泛型
    eclipse手动添加源码
    beanUtils操作bean的属性
    ref:JAVA之Forward和Redirect的区别
    ref:下一个项目为什么要用 SLF4J
  • 原文地址:https://www.cnblogs.com/jsRunner/p/3606990.html
Copyright © 2011-2022 走看看