Excessive Php scripting?
| From: | Justin Madru | Date: | Wed, 06 Sep 2006 05:02:36 +0000 |
| Subject: | Excessive Php scripting? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-241414@lists.php.net to get a copy of this message | ||
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, '">(more info)</a>
</td></tr>'; }