----- Original Message ---From: "Pete" <[EMAIL PROTECTED]>

> Tim Makins <[EMAIL PROTECTED]> writes
> >Warning: main(database.php): failed to open stream: No such file or
> >directory in /home/..mysite../public_html/include/session.php on line 11.
> >
> >Why would I get errors including a file, when if I click on the file
itself
> >all is quiet ?


> When calling an Include files, the include files will include files
> which have a path relative to the file that is originally calling the
> includes, so you have to watch your paths.
>
> /include/inc/this
> /include/inc
> /myfile
>
> If file2 in /include/inc calls a file3 in this, it can use the path
> /this
>
> If file1 in /myfile calls file2 in include/inc, then file3 will be
> searched for in /myfile/this, and it doesn't exist there.
>
> Pete Clark


Thanks for answering, Pete. In this case, I'm not sure that's the problem,
unless I'm not understanding you properly.

In the 'include' directory are these files:

include/constants.php
include/database.php
include/form.php
include/mailer.php
include/session.php
include/view_active.php

If I look in session.php, there is the following, (from line 11):

include("database.php");
include("mailer.php");
include("form.php");

If I look in database.php, there is the following, (from line 11):

include("constants.php");

The other 2 don't have any 'includes'.


If I click on session.php it runs without error, so that should indicate
that the paths within the page are OK - isn't that true? Yet my page on the
next level up 'test1.php' contains only some comments and this line:

include("include/session.php");

when I run it, I get errors. It doesn't seem to make sense.

<Spock>Its logic, Jim, but not as we know it</Spock>

Any more thoughts, anyone?

Tim in Ireland.



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to