Re: Excessive Php scripting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, '">(more info)</a> </td>
</tr>';
}

Well, 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/2006

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux