• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Source Code Curiosity

Started by Rafa,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RafaTopic starter

Hi,
In the root directory, "index.php" file we have two lines of code that I am curious about:

error_reporting(E_ALL);

and
$sttime = microtime(true);


What is the purpose of these two lines and how are they used?
Thanks,
Rafael
  •  

Marius P.

Hi, 

first http://php.net/manual/en/function.error-reporting.php

and second starts debugging, which can be enabled at the end of the file, removing the commenting around

//Debugging 
/*
if(is_admin()) {
echo "Time Elapsed: ".(microtime(true) - $sttime)."s [br /]";
echo "Database debug";
echo '';
$db->debug();
echo '';
echo '----------------';
echo "Cache database debug";
echo '';
$cachedb->debug();
echo '';
}
*/
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

RafaTopic starter

I see...
And where/how does the
error_reporting(E_ALL);

logs/displays these errors?

Thanks
  •  

Marius P.

It displays them on the page as any php script (not a good idea for live sites).
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)