You are here: Re: weird stuff with include statement « PHP Programming Language « IT news, forums, messages
Re: weird stuff with include statement

Posted by Thomas Kaarud on 07/02/05 04:43

* Jerry Stuckle wrote:

> Thomas Kaarud wrote:
>> <?php
>> //this is top.php
>> function write_1()
>> {
>> echo 'This is 1';
>> }
>> ?>
>> <?php
>> //this is bottom.php
>> function write_2()
>> {
>> echo 'This is 2';
>> }
>> ?>
>> <?php
>> //This is mainfile, e.g. index.php
>> include("top.php");
>> write_1();
>> ?>
>> Here is my index stuff...
>> <?php
>> include("bottom.php");
>> write_2();
>> ?>
>>
> Why go to all that trouble?
>
> Just put
>
> <?php
> echo "This is 1";
> ?>
>
> in top.php and include it where you want it (instead of calling a
> function).
>

Ofcourse, but it seems like this being a person who want to know how to
use included files, and obviously you don't have a singe included file for
any kind of include you would like....

--
Thomas

 

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

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