Posted 01 June 2006 - 08:42 PM
Posted 01 June 2006 - 09:59 PM
Posted 04 June 2006 - 03:58 PM
but my major question is how to allow php scripts running at the same time to share data.
(say 10 people access the site at the same time)
i could use a database to lug data back and forth, but there has to be an easier way
Posted 04 June 2006 - 04:32 PM
An easy option for minimal amounts of unchanging data is to just store it in variables and include this in each script that needs it.
Another easy option and one which allows you to update the data more easily is to use a database / text files.
Maybe another approuch would be to use a registry pattern? Like I say... It really depnds on the data. There is no such thing as an application wide object in php, though you could easily create one.
Posted 04 June 2006 - 04:54 PM
Actually I don't mind the database way as much. But I need something with less overhead.
It would be nice to just share data in memory through some kind of super global array. (in order to avoid reading from the HD every time)
How would I go about setting up this application wide object.
Posted 04 June 2006 - 10:44 PM
The easiest way would be to use the registry pattern. Im not sure how versed you are in OOP concepts but there is an article [a href=\"http://www.phppatterns.com/docs/design/the_registry\" target=\"_blank\"]here[/a] that might help you.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users