Codeigniter2.0使用ckeditor上传图片的问题

2011-04-12 阅读 50

Codeigniter2.0框架和Ckeditor结合上传文件(图片),无法识别的问题解决。其实就是对请求地址的解析上的问题。

Codeigniter2.0默认,uri_protocol为AUTO。这里就是出问题的地方。Ckeditor在发起上传请求的时候,在请求地址的后面使用get的方式传入的了更多的参数。

所以需要将uri_protocal的AUTO改为REQUEST_URI。

<pre class="brush:php;">    /*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of 'AUTO' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'   Default - auto detects
| 'PATH_INFO'  Uses the PATH_INFO
| 'QUERY_STRING' Uses the QUERY_STRING
| 'REQUEST_URI' Uses the REQUEST_URI
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol'] = 'REQUEST_URI';
```

Codeigniter 2.0 ckeditor 3 上传 图片 问题 REQUEST_URI uri_protocol

更新于 2023年03月28日