用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1606|回复: 2
收起左侧

[HELP] 天然纯小白:如何获取header的所有信息?

[复制链接]
发表于 2017-12-25 21:18:30 | 显示全部楼层 |阅读模式
本帖最后由 andyzu 于 2017-12-26 09:12 编辑

get_header() 貌似不能获取所有头信息;

  • $this->output->set_header('HTTP/1.1 200 OK');  
  • $this->output->set_header('Last-Modified: '.gmdate('D, d M Y H:i:s', $last_update).' GMT');  
  • $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate');  
  • $this->output->set_header('Cache-Control: post-check=0, pre-check=0');  
  • $this->output->set_header('Pragma: no-cache');  
我用这样的方式设置好头信息,我如何用get_header()获取所有的头信息?难道我只能带参数一个一个获取??

发表于 2017-12-26 16:43:22 | 显示全部楼层
貌似 PHP 有个 headers_list 函数
 楼主| 发表于 2017-12-28 19:23:22 | 显示全部楼层
CI 没有这样的函数?

本版积分规则