Forum Moderators: coopster

Message Too Old, No Replies

PHP SSI Error

         

wfernley

2:41 am on Jan 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can anyone explain this error to me :S.

Warning: Failed opening 'includes\header.php' for inclusion (include_path='.:/usr/share/pear') in /web/Wes/firestorm/clients/sktech/index.php on line 11

In the PHP file I have this line for the include.
<?php include('includes\header.php');?>

Now it works on my PC server which is IIS on WinXP Pro. But when I upload it to my friends server it gives me that error. The server is a linux machine, using apache i take it.

Can anyone help. :)

Thanks in advance.

Wes

jatar_k

2:48 am on Jan 6, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it is a path error, it can't find the file where you specified it was.

<?php include('includes\header.php');?>

first things first the slash needs to be /

also take a look to see if that path is correct. That path would start in the current directory, look for a directory named includes and then look for a file named header.php in that directory.

A good rule of thumb is to always start your paths at the root of your site and work up from there. Then the include line will be correct from any place on your site.

If your includes directory is located in the root of the site it would be like so.

include('/includes/header.php');

wfernley

2:58 am on Jan 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AHHH it was all in the "/". thanks for the reply, it was a huge help.

Thanks again. :)

Wes