Jump to content
php.lv forumi

probleemas ar session


udens

Recommended Posts

nevaru atrast probleemu kapeec nekas nenotik

 

te regjistreeju sesiju:

 

session_start();

session_register('login');

header("location:http://127.0.0.1");

 

 

peectam shitaa meegjinu paarbaudiit:

 

session_start();

if(!session_is_registered('login')){

 

}

esle {

 

}

 

 

bt sesija ntiek regjistreeta vai arii parbaudiita, nezinu jo nekas nenotiek....

Link to comment
Share on other sites

Redirekts vispār notiek ?

 

Ieslēdz error reportingu php.ini failā.

 

Un vari iztikt arī bez session_register un session_is_registered fjām. Tā vietā vienkārši $_SESSION['login'] = true; un if (isset($_SESSION['login'])).

 

Btw, ir else nevis esle ;).

Link to comment
Share on other sites

udens, es jau nepiedāvāju nekādu variantu :), es tikai ieteicu, kā man liekas labāk darīt.

 

Btw, no manuāļa:

If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where the PHP directive register_globals is disabled.

 

Un defaultā php nāk ar register_globals off.

Link to comment
Share on other sites

×
×
  • Create New...