Re: [PHP] Static Pages with PHP



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?
.



Relevant Pages

  • Re: separation
    ... Posting PHP code in a JS group is rather pointless, ... character in the parse tree, and, as a result, in the ... I did display it and you're right that   ... However, I did find that when using   over a space character, I ...
    (comp.lang.javascript)
  • Re: Interpreting the colon operator
    ... I tried this by using the print statement inside the loop. ... What follows then would be a display of ... is apparently affected by the fact that matlab is aware that 'Av' ... three-dimensional matrix even though the first index is restricted ...
    (comp.soft-sys.matlab)
  • Re: How to choose FPGA for a huge computation?
    ... Depending on the accuracy and bit size. ... in one clock cycle. ... the loop above is only one of a half dozen intermediate ... orders require different "relatively random" accesses to the memory ...
    (comp.arch.fpga)
  • Re: Text window not displaying inside loop
    ... // Idle until the screen redraws itself, ... MSG msg; ... functionality to loop every X-seconds then checking the figures again. ... trying to display them fresh on each loop to a text box. ...
    (microsoft.public.vc.mfc)
  • Re: Text window not displaying inside loop
    ... // Release main thread for background processing ... GiveTime(); ... functionality to loop every X-seconds then checking the figures again. ... trying to display them fresh on each loop to a text box. ...
    (microsoft.public.vc.mfc)