From C + + turn around, ask PHP initialization where? Is that the first time the program starts to read into the configuration data?
For example, in C + + there is a main function, you can do some startup initialization, read into the configuration table what, just do it once
Now write the service side with PHP, this similar function I need to add where? Thanks, eh!
------Solution--------------------
Just put it in the program!
------Solution--------------------
References:
Quote: References:
Just put it in the program!
But a Web access, service side of the corresponding PHP will not run once? Isn't it a program that reads resources every time?? If PHP does not have the main function that starts, I want to create a global variable class that reads the resources under this class. This global variable must be executed only once?
Each client access is to reopen a program client if it corresponds to C + +.
In general, PHP global variables or programs to run are placed in a init.php file, which file needs to use these global configuration information can contain this file.
For the same access user (session is not expired, the general session is closed after the browser is expired), the user can use the session to store the relevant configuration options, so that users can access other pages directly from the session to get the user's configuration options.