Home  >  Q&A  >  body text

Modifying the address of SESSION has no effect

; where MODE is the octal representation of the mode. Note that this

##; does not overwrite the process's umask.

; http://php.net/session.save- path

session.save_path = "D:/www/qq/sese"

After changing it, restart the server but the storage location is still the same as before. Why? There are still 2 sessions on it. I also tried to modify save_path but it didn’t work. Also, why can’t I press Enter to change the line in this input box? ? ? ? ? Another question is, will the session also store database connection information? I saw a file of more than 1M with a lot of stuff in it that seemed to be database information. What's going on? Kneel down and beg God for help

按键盘手指磨破皮按键盘手指磨破皮2648 days ago1113

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-07-20 09:17:52

    $session_path=$this->root()."session_tmp";
    if(!is_dir($session_path)){
        mkdir($session_path,true,777);
    }
    session_save_path($session_path);
    session_start();


    reply
    0
  • 按键盘手指磨破皮

    Boss, I don’t quite understand. I’m a newbie here. The $this->root you wrote above is for classes. Is there a class above? Is the tmp in session_tmp the address? Is it enough to change this TMP? Is this code placed in the session class?

    按键盘手指磨破皮 · 2017-07-20 09:22:12
  • Cancelreply