Newbie - Includes aren't working online

From: JamesB (james_at_imajica.com)
Date: 03/14/04


Date: Sun, 14 Mar 2004 12:39:26 +0000 (UTC)

Hi guys,

I've only just started using PHP4 this week and I seemed to be getting on
great until I hit this one problem.

I've built this dynamic menu system which displays e a variety of menus down
the side of the page. Which menu is displayed is controlled by a variable
which sits in the URL. The menu is inserted as an include into every page of
my site using the following code:
<?php include("../includes/menu.php"); ?>

This works fine and the menu is working 100% on my localhost version but the
moment I put it onto the clients test site it starts doing some very strange
things.

Firstly the menu isn't there. If you were to look at the code the include
has gone in fine but for some odd reason all of the PHP code has either not
executed or has been stripped out. I then run some tests on just the include
and again it's just showing the HTML code and nothing else.

I've tested the server with some basic lines of code and it's displaying a
'hello world' message fine, I've got an auto-forwarding on a page working
fine and I also run this code

<? if (file_exists(includes/menu.php)
{
    print("It's here")
}
else
{
    print("It's NOT here")
}

...which returns "It's here". So from what I can tell PHP is working fine
and the file is being inserted but it just won't run my code.

Oh one more thing, the system administrator is telling me that it could be
something to do with my paths and the way there setup but I've also tried an
absolute address on one of the pages and it still doesn't work.

Has anyone got any thoughts?

Thanks in advance.

JamesB



Relevant Pages

  • Re: PHP Beginner question
    ... Imagine a web of a shop with a table displaying the name of some ... Have the page call itself and add the php code at the top of the page to handle the order stuff. ... The second style separates the form from the business logic by having a pre-defined set of private data that is passed from the form to the business logic and from the business logic to the form. ...
    (comp.lang.php)
  • Re: newbie -how do you defend your decision?
    ... theres sooooooooo many things in .Net that makes dev so ... data onto grids and doing validations is a breeze now.. ... > output as simple php code". ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Site moved and now php code does not appear to work
    ... It appears that the php code is not running or ... Nothing related to php is displaying. ... Why would it work on one host and not the other? ... Another possiblity maybe that an extension that is ...
    (comp.lang.php)
  • PHP to RSS
    ... I'd like to create a simple RSS feed using some PHP code, e.g. displaying ... the remote IP and Host name. ...
    (comp.lang.php)