|
Posted by Ming on 05/17/07 06:24
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,
Navigation:
[Reply to this message]
|