Reply to Re: Cached include?

Your name:

Reply:


Posted by Jamie Davison on 10/10/66 11:39

On 2/10/06 9:51 AM, in article
43eca863$0$82675$ed2619ec@ptn-nntp-reader03.plus.net, "mark"
<mark@localhost.net> wrote:

> I have one very large include, which is an array. It's included when
> index.php is loaded. However, I now need to use the same include on
> page2.php, and page3.php and page4.php. Is there a smart way to do this and
> mimize load times on each sudsequent page?


You could serialize (http://us2.php.net/serialize) the array and then
register the serialized array as a session variable. With every call to the
array you would then have to unserialize the object . . .


$my_object = serialize($your_very_large_array);
session_register($my_object);



. . . For subsequent pages

function unpackit($ob)
{
ret_array = unserialize($ob);
return ret_array;
}

$my_large_array = unpackit($my_object);

.. . .

[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

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