English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I get the following error messages on the page that I want the file to display:

Warning: main(../test.php) [function.main]: failed to open stream: Datei oder Verzeichnis nicht gefunden in /usr/export/www/hosting/invaderzimonline/izo/sozo.php on line 138

Warning: main() [function.include]: Failed opening '../test.php' for inclusion (include_path='.:') in /usr/export/www/hosting/invaderzimonline/izo/sozo.php on line 138

I have no idea what they mean, or what I'm doing wrong, I hardly know anything about PHP Include. Can someone enlighten me?

2007-03-20 10:38:03 · 3 answers · asked by Mark Schultz 1 in Computers & Internet Programming & Design

3 answers

You can go the full path route as noted or you can include the url's relative from the first include. For example, if you have:

fileA.php
/includes/fileB.php
/includes/fileC.php

And fileA includes fileB, it would reference the "includes/" folder. If fileB includes fileC, then you would also need to use the "includes/" because it is considered from the fileA place.

2007-03-20 10:54:22 · answer #1 · answered by caseysoftware 2 · 0 0

use the full path to the test.php in the include statement.

2007-03-20 10:42:17 · answer #2 · answered by romulusnr 5 · 0 0

drop the ../ in your include statement.

I bet your include file is in the same directory. You are referencing one directory up (the parent directory).

2007-03-20 11:41:13 · answer #3 · answered by LorettoBoy 4 · 0 0

fedest.com, questions and answers