FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » A Few Noob Questions
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: A Few Noob Questions [message #175155 is a reply to message #175154] Wed, 17 August 2011 09:50 Go to previous messageGo to previous message
A.Reader is currently offline  A.Reader
Messages: 15
Registered: December 2010
Karma:
Junior Member
On Tue, 16 Aug 2011 20:31:30 -0400,
"eBob.com" <eBob(dot)com(at)totallybogus(dot)com> wrote:

> Thank you very much Denis. But now I have to ask ... How global are the
> $GLOBALS? From you answer I assume that $GLOBALS have a scope which exceeds
> one file. But how far beyond one file?
>
> Are there any kind of read/write variables which are shared between users?

I'd suggest avoiding $GLOBALS because it's a bit old and kludgey.

The $_SESSION array is available to all your routines and
persistent within your context --it's automagically saved and
restored between your pages and sessions. So you could have a
number of different programs with different purposes all sharing
the same $_SESSION array.

But your $_SESSION array is not available to anyone else unless
you contrive to make it available, for example by mailing the
other person your persistent session cookie, in effect making
that person a virtual you.

As far as sharing vars between users, I think you'd have to work
at it since one of PHP's goals is that your storage NOT be
available to others.

I've not so far had any need for it, so there might well be a
half-dozen solutions floating around out there, but if I did need
to have shared memory, I'd look into sockets, or shmem if the
users were all served from the same machine. The memory-caching
daemon memcached might be useful too.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to integrate paypal payment Indian currency support ..?
Next Topic: Looking for good C and C++ PHP plugin examples
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 19:34:39 GMT 2024

Total time taken to generate the page: 0.04617 seconds