开发者

PHP: Possible to access class after page loads via ajax?

I wasn't sure if when a class is instantiated with code in PHP, if is stays in the servers cache where it would be possible to access it with ajax (php file), or if it just dies once the script finishes running.

Is it possible to do this with a Kee开发者_Python百科p-Alive connection or something?

I know I'm showing my ignorance in web handle, but at the risk of looking like an idiot, I had to ask.

Thanks!

Edit: Oh, was also wanting to know, could you store an object in sessions to be accessed?


You can store an object in $_SESSION, and do operations on it just like any other object (i.e.

$_SESSION['object']->method();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜