aldis Posted June 10, 2007 Report Share Posted June 10, 2007 Nu tad taa! Peetu visadus skriptus! Samples, bet laikam galu galaa apskaidriba man neradaas! Iedomasimies.. divus failus index.php un action.php Seit butu vinju source! -----------=action.php=------------ <?php session_start(); $_SESSION['sessija'] = 1; ?> un -----------=index.php=------------ <?php if (!session_id()) session_id(); echo $_SESSION['sessija']; ?> Problema tada --> Vispirms ieeju action.php itkaa buutu jaauztaisa sessija... bet ieejot index.php man nekas taads neparaadas! Cik saprotu, ka man skripta k-kas truukst! Vai arii neesmu pareizi sapratis sessiju domu! Link to comment Share on other sites More sharing options...
Delfins Posted June 10, 2007 Report Share Posted June 10, 2007 (edited) Tas ir rakstīts visās grāmatās: session_start() jābūt visos php failos, kur tiks paredzēta sessiju izmantošana (nu tie, kas tiks pasaukti no web) PS: session_id() pārbaude un izsaukšana vispār nav vajadzīga Edited June 10, 2007 by Delfins Link to comment Share on other sites More sharing options...
Neps Posted June 10, 2007 Report Share Posted June 10, 2007 Nevajag taisīt muļķīgas QUOTEs (bubu) -----------=action.php=------------ <?php $_SESSION['sessija'] = 1; ?> -----------=index.php=------------ <?php session_start() // starteejam sessiju require_once('action.php'); // izsaucam action.php failu echo $_SESSION['sessija']; // printeejam to, ko pieshkjiiraam action.php failaa ?> var arii biki savaadaak Link to comment Share on other sites More sharing options...
Exzo Posted June 10, 2007 Report Share Posted June 10, 2007 Neps, tev ar vienu postu, bezjēdzīgo quotējot ir izdevies piegānīt visas manas 20" Link to comment Share on other sites More sharing options...
Recommended Posts