【问题标题】:Override uri_protocol on specific controller in Codeigniter在 Codeigniter 中的特定控制器上覆盖 uri_protocol
【发布时间】:2013-10-31 06:43:31
【问题描述】:

我需要覆盖 CodeIgniter 中某些控制器的配置文件中的 uri_protocol。我需要将其更改为“PATH_INFO”,因为我使用的是 Oauth 2.0,授权码是通过查询字符串返回的。

提前致谢!

【问题讨论】:

  • 你尝试了什么?为什么它不起作用?有什么错误?
  • 如果在配置文件中设置 'PATH_INFO',所有的 url 都会被重定向到主页。我认为这可能会导致我遇到一些问题,因为站点处于 Live 中

标签: codeigniter oauth authorization


【解决方案1】:

通过将行添加到配置文件中,我得到了查询字符串,

$_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
$config['uri_protocol'] = "PATH_INFO"; 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多