Hi,
I have a php file being called from many server, in this file I would like to load a configuration file, I would like to load the file once for all php request, how can I do it?
Basically I would like to load the configuration file once and save its content in some kind of cache, then each PHP request will use this cache and save the resources in reading this configuration file over and over again.
Many thanks.
Singleton solutions
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Singleton solutions
With PHP you usually load the configuration every request. Do you have a real performance problem?
(#10850)
Re: Singleton solutions
I expect to have a performance issue, is there a way to load the file into memory then read the params from there each call to the PHP?