Wednesday, December 2, 2009

Persists Asp Upload Serial Is There Any Way To Persist Objects Between Php Page Calls?

Is there any way to persist objects between php page calls? - persists asp upload serial

I tried to add variables to the variable $ _SERVER vain. He accepted a mission very well, but does not recognize the password on the next page.

I know that Web servers are stateless, but mechanisms exist in other languages (this type of function of the server variable is not in ASP, for example, if I'm not) remember, so hopefully something's missing manual.

test01.php:
-----------
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt;? php
$ _SERVER [ "MyObject"] = "Steve";
?>

test02.php:
-----------
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt;? php
echo $ _SERVER [ "MyObject"];
?>

1 comment:

Atif Majid said...

You can. Take a look below and read the simple code on the link below.
/ / Class.test.php
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt;? php
Test class
(
Function test ()
(
echo "Object created";
)

TestFunc function ()
(
echo "test basis";
)
)
?>
-------------------------------------- ...
/ / Test.php
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt;? php
"class.test.php require_once";
session_start ();
) $ ObjTest = new test (;
$ _SESSION [ 'ObjTest'] = $ objTest;
echo "\\ \\ \\ \\ \\ \\ \\ \\ u0026lt; pre>";
print_r ($ objTest);
echo "\\ \\ \\ \\ \\ \\ \\ \\ u0026lt; / pre>";
?>
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt a href = "test1.php"> Test1 \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; / a>
-------------------------------------- ...
/ / Test1.php
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt;? php
"class.test.php require_once";
session_start ();
ObjTest $ = $ _SESSION [ 'objTest'];
echo "\\ \\ \\ \\ \\ \\ \\ \\ u0026lt; pre>";
print_r ($ objTest);
echo "\\ \\ \\ \\ \\ \\ \\ \\ u0026lt; / pre>";
$ ObjTest-> TestFunc ();
?>
-------------------------------------- ...

Read this article
http:// Lists.evolt.org / archive / Week-to-M ...

Post a Comment