|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
pitbull1978 Smarty Rookie
Joined: 26 Feb 2004 Posts: 7 Location: Milan - Italy
|
Posted: Thu Feb 26, 2004 10:36 am Post subject: Accessing Smarty EXEC_TIME from my PHP application |
|
|
How can I do to access exec_time from my php scripts ?
For example, if you have turned on the debug console, you can see at the top of the page the load time in seconds...now I want to write this time (but not in debug mode) in my layout, passing this "exec_time" to the template.
Is there someone out there able to do this ?
Where can I put the $start variable ? Where can I put the $end variable ? What is the best way to do this ? I tried but I lost time !!! Exec_time for my scripts is "0" and this is not possible because the debug console tells me times are higher !!!
I'm developing a site where my template is stuctured in this way:
- a header (colspan 2) of 770x160
- a navigation bar (new row, 150px large)
- a content column (same row of the navigation bar, about 620px large)
So I have a header.tpl, a footer.tpl, a navbar.php and navbar.tpl, and all the templates I have are based on these files; I put contents in the content column...obviously!!!
All the contents are separated php files; putting the start variable at the start of this one and the end variable at the end and making the diff between the first and second, I obtain exactly "0"...so something is wrong...how can I do ? Please help me... |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Feb 26, 2004 6:39 pm Post subject: |
|
|
Perhaps this or this will help you? |
|
Back to top |
|
pitbull1978 Smarty Rookie
Joined: 26 Feb 2004 Posts: 7 Location: Milan - Italy
|
Posted: Thu Feb 26, 2004 9:07 pm Post subject: |
|
|
Thanx very much for the suggestions!!! I thought I was the only one who didn't know how to access exec_time, probably 'cause I'm a novice to Smarty...I will try both the possibilities...because both are interesting.
I'll try first the approach that extends the Smarty class..It's faster and more simple for a man who comes from pure PHP. I love Smarty, it's the revolution. Thanx very much boots !!! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|