Reply to Re: Curious situation

Your name:

Reply:


Posted by Shelly on 07/17/05 14:27

\"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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация