You are here: Re: Array defined as SESSION Array « PHP Programming Language « IT news, forums, messages
Re: Array defined as SESSION Array

Posted by Shelly on 07/20/05 12:28

<bettina@coaster.ch> wrote in message
news:1121848541.353870.213250@g47g2000cwa.googlegroups.com...
>I want to understand exactly how it functions:
> Include_once search.php means that it will be included only once in
> index.php (supposing that index,php calls search.php.
>
> But what happens if I leave index.php, go for example to a subpage and
> come back again to index.php? Include_once will be executed again? I
> think so.
> I tried with a control question ...if (!isset($myvar) make the
> search.... It seems to work a little bit quickly.
>

The include_once means that the inline code is included only one time, even
if it is included as part of another code. In that sense it is the same as
the #include formulations in C, where each piece is given a name and you has
the include stuff inside an #ifndef statement.

What do you mean by "subpage". A page calls another page. When it comes
back the original page is executed so the include_once stuff, while included
only once, is re-executed. That is why putting inside the if (!isset
bybasses the reselect.

Shelly

 

Navigation:

[Reply to this 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

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