views:

25

answers:

1

I'm running Ubuntu 10.04 with Apache2 and PHP5.

I have a directory structure like this:

\www\
    \index.php
    \parts
         \head.php
         \body.php

Inside my index.php I have a command

  <?php include("parts/head.php") ?>

and the equivalent for body. These files both exist and they contain more php and html code.

The only thing that shows up when I test the website on localhost (\var\www) is the html outside of the PHP commands. There is no error message, it's as if the file is included but empty.

It is exactly the same as on the website (not localhost) but it works perfectly on the website. I don't understand what is different. Any help would be appreciated.

A: 

Check your php.ini file to see if "." is on the path?

You could also try this:

include(basename(__FILE__).'parts/head.php');
SorcyCat