日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

如何解決CI框架的Disallowed Key Characters錯誤提示_PHP教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

推薦:解析PHP實現(xiàn)下載文件的兩種方法
本篇文章是對使用PHP實現(xiàn)下載文件的兩種方法進行了詳細的分析介紹,需要的朋友參考下 方法一: 復制代碼 代碼如下: header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filen

用CI框架時,有時候會遇到這么一個問題,打開網(wǎng)頁,只顯示 Disallowed Key Characters 錯誤提示。有人說 url 里有非法字符。但是確定 url 是純英文的,問題還是出來了。但清空瀏覽器歷史記錄和cookies后。 刷新就沒問題了。有時候。打開不同的瀏覽器。有的瀏覽器會有問題。有的就不會。

解決 CodeIgniter 框架應(yīng)用中,出現(xiàn)Disallowed Key Characters錯誤提示的方法。找到/system/core文件夾下的Input文件,將下面的代碼

復制代碼 代碼如下:
function _clean_input_keys($str)
{
    if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
    {
        exit('Disallowed Key Characters.');
    }
    // Clean UTF-8 if supported
    if (UTF8_ENABLED === TRUE)
    {
        $str = $this->uni->clean_string($str);
    }
    return $str;
}


改為:

復制代碼 代碼如下:


function _clean_input_keys($str)  
{  
    $config = &get_config('config');  
    if ( ! preg_match("/^[".$config['permitted_uri_chars']."]+$/i", rawurlencode($str)))  
    {  
        exit('Disallowed Key Characters.');  
    }  

    // Clean UTF-8 if supported
    if (UTF8_ENABLED === TRUE)
    {
        $str = $this->uni->clean_string($str);
    }
    return $str;  
}

分享:PHP系統(tǒng)命令函數(shù)使用分析
本篇文章是對PHP中系統(tǒng)命令函數(shù)的使用進行了詳細的分析介紹,需要的朋友參考下 復制代碼 代碼如下: function execute($cmd) { $res = ''; if ($cmd) { if(function_exists('system')) { @ob_start(); @system($cmd); $res = @ob_get_contents(); @ob_end_clean(); } els

來源:模板無憂//所屬分類:PHP教程/更新時間:2013-07-06
相關(guān)PHP教程