scraptoft Posted November 3, 2006 Share Posted November 3, 2006 I have a dynamic php + mysql page.Does anyone know the code to show how long the page took to load?i.e Total time taken to generate page: 0.08seconds.Cheers. Link to comment https://forums.phpfreaks.com/topic/26086-time-taken-to-generate-page/ Share on other sites More sharing options...
Orio Posted November 3, 2006 Share Posted November 3, 2006 If you are using PHP 5+[code]<?php$start=microtime(TRUE);//all of the page code//end of pageecho "Time took- ".round((microtime(TRUE))-$start,2)." seconds.";?>[/code]Orio. Link to comment https://forums.phpfreaks.com/topic/26086-time-taken-to-generate-page/#findComment-119259 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.