|
楼主 |
发表于 2014-4-17 10:53:28
|
显示全部楼层
在网上找到这个函数 单的测试可以正确处理中文
在codeigniter控制器里面使用就不可以
为什么啊
PHP复制代码 function path_info ($filepath)
{
$path_parts = array();
$path_parts ['dirname'] = rtrim(substr($filepath, 0, strrpos($filepath, '/')),"/")."/";
$path_parts ['basename'] = ltrim(substr($filepath, strrpos($filepath, '/')),"/");
$path_parts ['extension'] = substr(strrchr($filepath, '.'), 1);
$path_parts ['filename'] = ltrim(substr($path_parts ['basename'], 0, strrpos($path_parts ['basename'], '.')),"/");
return $path_parts;
} 复制代码
|
|