Help regarding errors and date function
Posted: Wed Aug 11, 2010 12:44 pm
Hello,
I ve 2 problems :
I ve PHP 5.2.6 and Apache 2.2.15 on Win7 (32 bit).
1)
I am unable to see error messages when i commit a mistake in syntax.
Ex: if i miss out a ";" after an echo statement or if i write mysql_connecti instead of proper syntax,i JUST GET a blank page without any of the code line being executed.I want to see error messages so that debugging becomes easy in a large file.
2)
To display the time of system and date i use:
echo "Today's Date is: ".date("d/m/Y")."<br><br>";
echo "Current time is: ".date("H:i:s")."<br><br>";
And this is what is get:
(Checked at 21:09 on 10/08/2010)
Today's Date is: 10/08/2010
Current time is: 15:26:47
The date is proper But the time being shown is different from expected(21:09).
I will be implementing this time to record the logged in time of a user on my site.so i need to determine the time properly.
any input will be appreciated.
thanks in advance.
-amit
I ve 2 problems :
I ve PHP 5.2.6 and Apache 2.2.15 on Win7 (32 bit).
1)
I am unable to see error messages when i commit a mistake in syntax.
Ex: if i miss out a ";" after an echo statement or if i write mysql_connecti instead of proper syntax,i JUST GET a blank page without any of the code line being executed.I want to see error messages so that debugging becomes easy in a large file.
2)
To display the time of system and date i use:
echo "Today's Date is: ".date("d/m/Y")."<br><br>";
echo "Current time is: ".date("H:i:s")."<br><br>";
And this is what is get:
(Checked at 21:09 on 10/08/2010)
Today's Date is: 10/08/2010
Current time is: 15:26:47
The date is proper But the time being shown is different from expected(21:09).
I will be implementing this time to record the logged in time of a user on my site.so i need to determine the time properly.
any input will be appreciated.
thanks in advance.
-amit