In PHP4, I am using file_get_contents('file.sql',true) to bring in SQL
queries from files who's directory is on the include path.  It works
fine in the main php scripts (ones accessible through URLs), but when
done in a php script that is included by one of the main scripts I
just get false instead of a string.  The files exist, the include path
is correctly set at all times (I've checked), and the exact same code
works when placed directly in the main php script.  I've been tearing
through documentation for hours.  Is there some quirk, or setting I'm
missing?  Below is an example of what I'm doing.

  set_include_path(get_include_path . ':/absolute/path/to/sql');

  $SQL1 = file_get_contents('query.sql',true);
  //$SQL1 == contents of query.sql

  $SQL2 = file_get_contents('query.sql',true);
  //$SQL2 == false
  //My path is still intact here

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to