Php judge Time size activity End time: $ gedate = $ rs-& gt; gedate; Current time: $ nowdate = date ('Y-m-dH: I: s '); & nbsp; $ a = $ nowdate-$ gedate; if ($ a & gt; 0) {ech php determines the time size
Activity End time: $ gedate = $ rs-> gedate;
Current time: $ nowdate = date ('Y-m-d H: I: s ');
$ A = $ nowdate-$ gedate;
If ($ a> 0 ){
Echo "not expired ";
} Elseif ($ a <0 ){
Echo "expired ";
} Else {
Echo "Same Time ";
}
No matter how you change '$ gedate', "the same time" is displayed. thank you! Thank you!
------ Solution --------------------
PHP code
$ A = strtotime ('2017-05-10 10:10:10 ')-time (); if ($ a> 0) {echo' not expired ';} else if ($ a <0) {echo 'expired';} else {echo ';}
------ Solution --------------------
Discussion
No problem with my code, no problem with yours, but I wrote it wrong! Can you explain what time () means? Is it the same as date ('Y-m-d H: I: s!