Computer Science Canada directory scanning function |
Author: | PaddyLong [ Thu Aug 21, 2003 12:47 pm ] | ||
Post subject: | directory scanning function | ||
this function would be especially useful for things like photo galleries or other things that require obtaining all the files in a directory (it uses regular expressions too, so you can get all the files of a specific type or named a certain way, etc etc) note that this uses eregi so its searches are case insensitive... easily changed by changing it to ereg
|
Author: | Homer_simpson [ Thu Aug 21, 2003 2:52 pm ] |
Post subject: | |
heh... cool +50 bits |
Author: | Amailer [ Thu Aug 21, 2003 8:31 pm ] | ||
Post subject: | |||
Nice, Ill use that for the pix display i .....was creating..some time ago..wonder where it is.. Anyways, You guys know how some sites have 'How many sec it took to generate a page'?
![]() 1 thing...how do i get the percentage of the PHP and MYSQL Queary it loaded? or w/e? I.E: (4.06% PHP - 95.94% MySQL) |
Author: | PaddyLong [ Thu Aug 21, 2003 9:51 pm ] |
Post subject: | |
so you mean like is there any way to find out how much time it spent on sql queries and how much time it spent on parsing actual php? ... well... I guess you could get the time of loading the page just before you do the query, and then again after you do the query, get the difference (after time - before time) of those and add that value to some total mySQL time variable .... and then for the php time it would be total time of document - mySQL time ... and then the percents would be easy from there... I know it might not be the cleanest way to do it... but it's the best way that I can think of (I couldn't find any predefined function that gets the time a query took ... closest was probably mysql_info() which looks like it just gives info about what tables, rows etc were affected or something) |
Author: | Amailer [ Fri Aug 22, 2003 12:19 am ] |
Post subject: | |
What about the PHP? Like...the percentage of the PHP loaded on the page... |
Author: | PaddyLong [ Mon Aug 25, 2003 11:01 am ] |
Post subject: | |
well... assuming there's only mysql and php that you are dealing with do something like totalTime - mysqlTime = phpTime |