您的位置:首页 > 博客中心 > 互联网 >

MAMP环境下 cookie无法正常使用

时间:2022-04-29 00:35

mac os x + mamp 安装PHP环境,碰到在PHP中无法保存删除cookie的操作。

原来是php.ini 中 output_buffering 设置被关了,直接修改php.ini总是不行,最后google了一下,操作方法如下,这里做个记录。

  1. Start MAMP PRO
  2. Select File -> Edit Template -> PHP4 php.ini / PHP5 php.ini
  3. Search this line "output_buffering = Off"
  4. Change "Off" to "On" or to a maximum number of bytes instead (for example "4096")
  5. Save the file
  6. Start Servers

总结,相应在linux或其它环境下如果出现这个问题应该也是类似的方法

本类排行

今日推荐

热门手游