【问题标题】:Codeigniter allow accented letters in URLCodeigniter 允许在 URL 中使用重音字母
【发布时间】:2011-06-05 20:37:52
【问题描述】:

所以你在 CodeIgniter 中有这个偏好:

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

您如何更改它以允许 é、à、è、ç 等?我的搜索网址需要这个。

【问题讨论】:

  • 所以我只是在里面输入'Unicode'?我真的想在这里小心,因为某些字符不应该出现在 url 中
  • 不,当您搜索时,那些“重音字母”称为 Unicode。查看WikipediJoel's article

标签: url codeigniter uri diacritics


【解决方案1】:

permitted_uri_chars 列表中添加您想要使用的任何字符。

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-éàèç';

【讨论】:

    猜你喜欢
    • 2020-12-15
    • 2012-03-09
    • 2011-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-05
    • 2012-05-14
    • 2016-10-05
    相关资源
    最近更新 更多