Undefined variable 해결:SESSION 방법

791 단어
Notice: Undefined variable: _SESSION의 원인 및 해결 방법
Undefined variable:SESSION 오류의 원인은 php session이 켜지지 않았기 때문입니다.다음은 두 가지 해결 방법이 있습니다.프로그램에 세션 추가start () 함수 2.php.ini에서 session.auto_start = 0이session으로 설정됩니다.auto_start = 1 이상은 Undefined variable:SESSION 방법.출처:http://www.phpbest.com/html/content-9-377-1.html
Notice: A session had already been starte 해결 방법
Notice: A session had already been started – ignoring session_start() in .. on line ..This happens when you try to start session more than once.The solution for above problem is1) in php.ini file set session.autostart to 0
session.auto_start = 0

2) In your code use this line
if (!session_id()) session_start();

instead of
session_start();

좋은 웹페이지 즐겨찾기