Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: generation time

  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    generation time

    came someone tell me what hte variable or function is to show the time that to php file took to generate? if this isnt a variable or function could someone please tell me how todo it thanks
    photoshop too expensive? use the GIMP! www.gimp.org

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you be more specific about "generate", because it's not clear to me if you want to retrieve the time when a PHP file was last modified or how long it took a PHP script to process?

  • #3
    Registered User
    Join Date
    Jun 2002
    Location
    Arizona
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i think he means how long it takes for php to processes, or how long it to precess the page.

  • #4
    Regular Coder
    Join Date
    May 2002
    Location
    London, England
    Posts
    369
    Thanks
    0
    Thanked 0 Times in 0 Posts
    At the beginning of the page, put this

    PHP Code:
    <?
    include("includes/mysql.php");
    $timeparts explode(" ",microtime());
    $starttime $timeparts[1].substr($timeparts[0],1);
    ?>
    at the bottom, put this before where you want to place teh message.

    PHP Code:
    <?
    $timeparts 
    explode(" ",microtime());
    $endtime $timeparts[1].substr($timeparts[0],1);
    $total_length $endtime-$starttime;
    $total_length round($total_length,6);
    ?>
    Jee
    Last edited by Jeewhizz; 07-01-2002 at 12:34 PM.
    Jeewhizz - MySQL Moderator
    http://www.sitehq.co.uk
    PHP and MySQL Hosting

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks thats great
    photoshop too expensive? use the GIMP! www.gimp.org


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •