Page 1 of 1

Need help on application context

Posted: Sat Sep 16, 2006 3:52 am
by KT
Hi All,

I am new to php and I need some way to keep data in something like applicatioon-context so that it can be read by my application, available to all sesions. Similiar to application-context we have in Java. I dont want to keep this information on flat-files on server.

Can somebody suggest me some way to achieve this?

Thanks in Advance,

Kapil

Posted: Sat Sep 16, 2006 4:17 am
by onion2k
PHP doesn't have it built in. You'll need to implement the functionality yourself .. with a database table (a heap for the sake of speed probably) that's read at the beginning of a script, or a shared memory area (with shmop for example).

If your intention is to store a database connection pool in it then you'll want to look at the _pconnect functions for your chosen database.