[phpa] Dynamic includes?

  • From: "Robert M." <roberteng@xxxxxxxxxxx>
  • To: phpa@xxxxxxxxxxxxx
  • Date: Tue, 26 Mar 2002 12:59:41 -0700

I'm wondering how PHP Accelerator handles includes that are run-time 
selected?

I am currently building a multi-lingual website that segregates all 
language-specific text as 'define' statements in separate include files.  
This way I can assign a directory at runtime according to the user's 
preferences, and present the website in the language of his choice.  Here is 
an example:

Script ./en/labels.inc
  define('LBL_HELLO', 'Hello');

Script ./fr/labels.inc
  define('LBL_HELLO', 'Bonjour');

In the main application script:
  $lang = get_language();   // Returns either 'en' or 'fr'
  include_once("./$lang/labels.inc");
  echo "<br>".LBL_HELLO."<br>";


Will PHP Accelerator actually accelerate this type of construct?  The 
language directory is fixed for a particular script invocation, but 
different users could simultaneously make requests using include files from 
different directories.

Any advice or comments greatly appreciated!











_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts: