Andy Jacobs wrote:[color=blue]
> In article <8z_%d.4000$%d7.2439@lakeread03>,
> Joe Webster <joe@cawfeemilk.com> wrote:
>
>[color=green]
>>Andy Jacobs wrote:
>>[color=darkred]
>>>Hi All
>>>
>>>I've tried as many combinations as I can think of but I'm not getting any
>>>where. This is what I have:
>>>
>>><?
>>>$menu = 'menus/' . $HTTP_GET_VARS['menu'] . '.inc';
>>>echo $menu;
>>>?>
>>>
>>>I've tried this with the full URL of the inc file as well which just
>>>contains some HTML.
>>>
>>>I then have:
>>>
>>><td><?php require'$menu'; ?></td>
>>>
>>>I've tried:
>>>
>>><?php require('$menu'); ?>
>>><?php require($menu); ?>
>>><?php require'$menu'; ?>
>>><?php include('$menu'); ?>
>>><?php include($menu); ?>
>>><?php include'$menu'; ?>
>>>
>>>It echoes the $menu string correctly but it either just truncates at <td>
>>>or
>>>it displays the rest of the page but I just get <td></td>
>>>
>>>Can someone point me in the right direction please.
>>>
>>>Best
>>>
>>>Andy
>>>[/color]
>>
>>Wow,
>>
>> No one can say you didn't try! Firstly, don't use HTTP_GET_VARS or
>> the
>>like as they are depreciated. Use instead the newer $_GET, $_POST, $_SERVER.
>>
>> The correct what to include/require a file is with require() or
>>include(). So both the first two requires would work as well as the
>>first two includes.
>>
>> I wonder if it's not working because the path is wrong? If you are
>> not
>>seeing an error, then your error reporting is turned off (as is the
>>default with newer versions of PHP if I remember correctly). Check out
>>
http://us3.php.net/errorfunc and turn on error reporting for now.
>>
>>HTH,
>>Joe[/color]
>
>
>
> Remember the old game of mastermind with little pegs? If you do then I
> think this was what I was doing. I had one part right and 3 wrong. I
> fixed one of the 3 wrong parts and then broke the one right part. One
> of these being to actually upload the include files - ooops!
>
> Anyway, thanks for the input. I must get into the habit of user the
> newer variables!
>
> Cheers
>
> Andy[/color]
Gremlins