Submitted by Joel Alexandre (not verified) on Fri, 2005-12-23 11:47.

These methods won't work if you include the file from different relative path.
Ex:
directory structure:

/web
  file1.php
  include_me.php
  /dir1
    file2.php

in file1.php the include is done by:
includeWrapper::includeOnce("include_me.php");

but in file2.php it's done by
includeWrapper::includeOnce(dirname(__FILE__)."/../include_me.php");

Using the includeWrapper class, the same file get's included twice.
I guess the php's include|require _once are slower because it translates the path.

If you'll add that missing feature, then it works ok.

If i'm wrong, let me know.

Joel

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

Datenschutz | Impressum