Birden PHP Oturumları

2 Cevap php

I am to build a PHP application for a website that already has another PHP application running on the same domain/server. My app will of course be using sessions, and I don't want my sessions to interfere with the existing app. For example if I want to use $_SESSION['username'], maybe the other app also uses $_SESSION['username'], which could be a problem. I'm not looking for an extra layer of security, I trust the application I'm sharing the host with. I just want to avoid bugs.

Bir yolu $ _SESSION ['MY_APP_NAME'] ['username'] gibi bir şey yapmak olacaktır, ama ben daha kolay bir yolu olup olmadığını bilmek istiyorum.

Ben 'session_module_name' adında bir işlevi olduğunu PHP belgelere bakın. Ismi kulağa hoş geliyor, ama docs gerçekten bunun için ne olduğunu açıklamak yok.

Herhangi bir tavsiye?

2 Cevap

Ayrı uygulamalar tutmak size yardımcı olabilir başka bir şey sizin seçtiğiniz bir klasöre php.ini içinde session.save_path ayar veya session_save_path() arayarak ya da başka bir yere oturum depolama taşımak olduğunu önce session_start ().