Reply to Re: Checking variables in an include

Your name:

Reply:


Posted by Victor on 10/06/06 22:44

> How are you expecting it to be set? You're (almost certainly) executing the
> remote PHP file in a totally different context - all you're include()ing is the
> output of the PHP file from the remote server.
>
> The only way it could work is if the webserver you're calling returns the PHP
> source verbatim, without processing it, in which case it's run in the same
> context as the calling script.
>
> Are you sure you want to be doing remote HTTP includes? Including from the
> filesystem is by far the more common usage, and is more likely to behave how
> you expect.
>
You see, the file I am including is not a remote one. It sits in my
project directory. I agree, it might be not the best way to do
includes, but this way it is easier for me, because I use rather many
of them, calling them from different sublevels of the directory. And
the file that makes the described include is also not the one that has
set the variable $domain, but already 4th or something like this in the
hierarchy of includes. Nevertheless, it sees the variable and
constructs a correct name of the next include.
Suddenly, this following include does not see the $domain any more...

Victor

[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

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