You are here: Re: include a file with parameters « PHP Programming Language « IT news, forums, messages
Re: include a file with parameters

Posted by Peter van Schie on 10/25/29 11:22

julian_m wrote:

> Will pagecalled.php "see" both $argument1 and $argument2? How?

Yes, because include() basically just inserts the code from
pagecalled.php at the position of the include call. Therefore the
$argument1 and $argument2 variables are available to the code in
pagecalled.php if you set them like this.

> If so, why do we use this way: pagecalled.php?argument1=x&argument2=x?
> Is it just an option to do the same?

No, it's not the same. You're talking about the HTTP GET method to send
data to a script from a html form, for instance data a user submitted
using a html form.

In your case you just want to be able to use php variables in a php
script you include from another php script.

--
http://www.phpforums.nl

 

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

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