Re: [PHP] Static Pages with PHP
- From: ceo@xxxxxxxxx ("Richard Lynch")
- Date: Mon, 20 Nov 2006 16:14:47 -0600 (CST)
On Sun, November 19, 2006 10:50 pm, John Comerford wrote:
I am new to PHP and I am looking at mixing dynamic and static pages to
build my web application. I have a situation where, depending on some
parameters I will display a static page from within my PHP code. My
question is, is there a 'trick' to doing this or do I just read in the
file and echo it out again ?
http://php.net/readfile
this is good for small files
For monster large files, you probably want to fopen/fread in a loop.
You might be able to rig things so that you are linking to a true
static page when you need it.
But you're only looking at a minor performance penalty for running it
through PHP. (Like maybe 5%) So unless your running some sort of
millions of hits a minute site, it's probably better to just keep it
simple and do a readfile() or fread() loop.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
.
- References:
- Static Pages with PHP
- From: John Comerford
- Static Pages with PHP
- Prev by Date: Re: [PHP] Little script that might help against some email-/webcrawlers
- Next by Date: Re: [PHP] Static Pages with PHP
- Previous by thread: Re: [PHP] Static Pages with PHP
- Next by thread: Wordwrap with UTF8/htmlentities
- Index(es):
Relevant Pages
|