PHP Caching Question -


i worked on project on .net , part of code involved reading header , footer pre-defined format consistency across various websites shared same client.

i faced similar problem in php. contents of header/footer links using:

<?php $contents = file_get_contents('http://www.mysite.com/common/footer.asp'); echo $contents; ?> 

is there way can load cache avoid repeated calls http://www.mysite.com/common/footer.asp

cheers

if looking cache across many page loads, use session.

session_start(); $_session['somekey'] = value; 

or persistent storage flat file, database or memcache.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -