PHP session start “Cannot send session cookie and cache limiter”

前端 未结 3 1907
野的像风
野的像风 2021-01-14 03:10

I\'ve changed my hosting server from a Windows to a Linux system. But when I run my PHP program, I get this errors:

Warning: session_start() [function.sessio         


        
3条回答
  •  梦毁少年i
    2021-01-14 03:24

    i think you should add

    ob_start();

    in the first of your code

    and in the bottom add

    ob_get_contents(); ob_end_flush();

    because of

    session send headers to server , also you added echo ( this also tell server its html with headers )

    server now has to headers so use the ob_start(); and ob_end_flush(); to work :)

提交回复
热议问题