[eluser]John_Betong[/eluser]
Hi CoolFactor,
Quote:1. You're using a form to select the application
2. When submitted, it creates/replaces an _application.php file that defines an APPLICATION_FOLDER constant.
3. index.php reads _application.php and launches the application defined in APPLICATION_FOLDER.
Am I right?
Yes you are completely correct in all three assumptions.
Quote:Question - how persistent does the application need to be? If it's only session-
based, I'd probably opt to store the Application name in a standard PHP Session
variable rather than a file. Just from a performance standpoint, checking for
the existence of a file takes way longer than checking for a session variable.
Second, the directory where the file was stored would need write privileges,
reducing the overall security of the setup.
Answer - The basic idea is only to make selecting different applications at the
Locahost platform. I agree about the session-based variable would be far better
especially from a performance standpoint..
Unfortunately I have never completely come to terms with session_start(),
unset(), SID, etc. With error_level(E_STRICT) always produces warnings and/or
errors that I am unable to get round. I have just tried using sessions() and
tied myself in knots. I will give it a try later since I have work to do
Cheers,
John_Betong