You are here: Re: Embed lots of html code in php & construc objects in php « PHP Programming Language « IT news, forums, messages
Re: Embed lots of html code in php & construc objects in php

Posted by Ciaran Byrne on 05/17/07 15:41

On May 17, 7:24 am, Ming <minghu...@gmail.com> wrote:
> Hi folks,
>
> I have a php file, it contains just a few php codes. The php codes I
> need to use is to construct an object, and use it several times, from
> html head until the last line of html code.
>
> I know I can construct the same object (I am using php5) several
> times, something like $object = new $class, and use several <?php
> $object->functionX ?> ... <?php $object->functionZ ?> to include
> php code in html code.
>
> However, to construct this object I have to call a remote server, and
> rely on its response, which is a bit slow. To construct it several
> times takes even more time, and I do not like that.
>
> So my questions are :
>
> 1) How can I embed a big chunk of html code in php without using
> something like echo "<a href=\"aaa.html\">" all the time
>
> 2) Can I just construct an object one time and use it in different <?
> php ... ?> blocks?
>
> Thanks,

How about including it? see http://uk.php.net/manual/en/function.include.php

 

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

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