[thelist] weird include() problem in PHP

Dave Stevens stem at stemofficial.co.uk
Sat Mar 30 16:34:01 CST 2002


Hi all,

I'm having a strange problem while using the include() function (PHP).

Check out these two links:

http://www.stemofficial.co.uk/site/phpVersion/?section=lyrics

and

http://www.stemofficial.co.uk/site/phpVersion/?section=visual

The site has an index.php which has this in it:

<?php

   if ($section) {

     include("sections/$section/$section.php");

   } else {

     include("sections/home/home.php");

   }



?>

and the two pages above that are included by the statement on the
index.php page have this code at the start of the file:

<?php

   include('../../ref/locations.php');

?>

Which contains base addresses for the css file, the images folder, etc.

What I don't understand is that the exact same piece of code, in the
exact same place, with the only differences between the two pages being
the text in them, doesn't work on one (?section=lyrics) but works
perfectly on the other (?section=visual).

Any ideas??

Cheers,
Dave Stevens




More information about the thelist mailing list