uni Posted January 26, 2005 Report Share Posted January 26, 2005 Kaa tad lai regjistree globaalos mainiigos?? Kkur bija saciits, ka nedriikst mikseet session_register ar _SESSION, a kam tas peedeejais domaats? Un veel - vai ir iespeejams pieregjistreet sesijas mainiigajos class-i? Link to comment Share on other sites More sharing options...
Venom Posted January 26, 2005 Report Share Posted January 26, 2005 miksēt jau var, bet vieglāk register vietā izmantot pa tiešo $_SESSION['index']='value'; saglabāt sessijā klases instanci var, bet pie "ārā ņemšanas", tā tev būs tomēr jāatvasino, kaut vai no stdClass Link to comment Share on other sites More sharing options...
uni Posted January 26, 2005 Author Report Share Posted January 26, 2005 A kaa peectam skriptaa nolasa?? $index vai $_SESSION['index']? Link to comment Share on other sites More sharing options...
uni Posted January 26, 2005 Author Report Share Posted January 26, 2005 <?php if (! isset($_SESSION['count'])) { $_SESSION['count'] = 1; } else { $_SESSION['count']++; } echo $_SESSION['count']; ?> Shaads te skripts VIENMEER izdod 1.. Un ja vnk $count, ta neko vispaar.. Kaapeec? Link to comment Share on other sites More sharing options...
рпр Posted January 26, 2005 Report Share Posted January 26, 2005 saakumaa jau jaapieliek arii session_start() Link to comment Share on other sites More sharing options...
Venom Posted January 26, 2005 Report Share Posted January 26, 2005 A kaa peectam skriptaa nolasa?? $index vai $_SESSION['index']? 13120[/snapback] of course $_SESSION['index']; otrais variants iet pie register_globals=on, kas ir evil Link to comment Share on other sites More sharing options...
uni Posted January 26, 2005 Author Report Share Posted January 26, 2005 Thanks a million!! Tikai veel par taam class.. Kaa lai uztaisa klasi ar mainiigajiem (tb struktuuru) & ieliek sesijas mainiigajos? Doma taada, ka tas mosh peectam kodaa eertaak rakstiit, nav taads sajukums.. Vai taa var buut? Shaads piegaajiens der: class _user{ public id=""; public nick=""; } if (!isset($_SESSION['user'])) $_SESSION['user'] = new _user; ? Link to comment Share on other sites More sharing options...
Recommended Posts