PHP session handling errors

后端 未结 13 1140
感动是毒
感动是毒 2020-12-15 17:33

I have this at the very top of my send.php file:

ob_start();
@session_start();

//some display stuff

$_SESSION[\'id\'] = $id; //$id has a value         


        
13条回答
  •  伪装坚强ぢ
    2020-12-15 18:01

    you have to change your session.save_path setting to the accessible dir, /tmp/ for example

    How to change: http://php.net/session_save_path

    Being on the shared host, it is advised to set your session save path inside of your home directory but below document root

    also note that

    • using ob_start is unnecessary here,
    • and I am sure you put @ operator by accident and already going to remove it forever, don't you?

提交回复
热议问题