Re: Excessive Php scripting?
| From: | Miles Thompson | Date: | Wed, 06 Sep 2006 14:30:32 +0000 |
| Subject: | Re: Excessive Php scripting? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241415@lists.php.net to get a copy of this message | ||
At 02:02 AM 9/6/2006, Justin Madru wrote:
I'm creating a simple personal web server. On a few of the pages is a html table. I was thinking of making it a php script, and the script would just output the html code for _one_ row. I would be calling the same very small php script maybe _30+_ times in the same page. My server is only 500MHz and 160MB ram, so I want to know if I should make it a php script or just html? Would calling the same function 30+ times _bog_down_ my server or would it actually _improve_performance_ (because of caching)? an example script: function print_table_row($name, $address, $os, $wiki) { echo '<tr> <td class="t_program"> <a href="', $address, '">', $name, '</a> </td> <td class="t_program">', $os, '</td> <td class="t_program"> <a href="http://en.wikipedia.org/wiki/', $wiki, '">(moreWell, I'm a programmer, so even if the info was fairly static I'd stick it in an array and the then loop through the array, calling your function. to me, that's simpler. OTH - just build am HTML table. Either way, no big deal. I doubt you'll see much of a speed difference Cheers - Miles -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.7/438 - Release Date: 9/5/2006info)</a> </td></tr>'; }