Posted by Shelly on 07/17/05 14:52
That worked. Thanks.
Shelly
"Shelly" <sheldonlg.news@asap-consult.com> wrote in message
news:UICdnSJov_1L3UffRVn-rA@comcast.com...
> \"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
> news:8t6kd1565d7i3saln8tjhth9fm2prerhmn@4ax.com...
>>I noticed that Message-ID: <oq2dndVvafIpRETfRVn-og@comcast.com> from
>> Shelly contained the following:
>>
>>>Why do the php code lines show up in the output?
>>
>> At a guess you haven't put <?php and ?> around the code in decomp.inc
>>
>> When doing an include or a require you effectively drop out of php. So
>> what you really have is:
>>
>> ?>
>> $num = $_SESSION['num'];
>> $var1 = $_SESSION['var1'];
>> <?php
>>
>> hence the code is simply treated as plain html
>
> Makes sense. No, I didn't because I thought includes worked the way they
> do in C, C++, Java, etc. Looking at the my other include for db stuff
> (that was set up in Connections in Dreamweaver) it has the bracketing.
> What is interesting is I use that code as:
>
> <?php require_once("dbLoginStuff.php"); ?>
>
> and the dbLoginStuff.php has
>
> <?php stuff ?>
>
> I didn't notice this before, but this would give
>
> <?php <?php stuff ?> ?>
>
> if it worked like other includes.
>
> Thanks.
>
> Shelly
>
[Back to original message]
|