Need help on application context

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
KT
Forum Newbie
Posts: 1
Joined: Sat Sep 16, 2006 3:47 am

Need help on application context

Post 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
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
Post Reply