|
 |
|
เช็ควันที่กรอก อย่างไร - เช็ควันที่เริ่ม จดทะเบียน กับวันหมดอายุ โดยวันหมดอายุ |
|
 |
|
|
 |
 |
|
Code
<?php
$date_start = "2009/02/26"; //วันที่เริ่ม จดทะเบียน
$date_end = "2009/02/26"; //วันหมดอายุ
$date1=explode("/",$date_start);
$date2=explode("/",$date_end);
$init_date = mktime(12,0,0,$date1[1],$date1[2],$date1[0]);
$dst_date = mktime(12,0,0,$date2[1],$date2[2],$date2[0]);
$offset = $dst_date-$init_date;
$days = floor($offset/60/60/24);
if ($days<0) echo ("ไม่ถูก");
else echo ("ถูก");
?>
ประยุกต์ใช้ดูนะครับ
|
 |
 |
 |
 |
Date :
2009-03-31 16:22:31 |
By :
นักเรียน |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ
|
 |
 |
 |
 |
Date :
2009-03-31 16:26:48 |
By :
khunset |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
Load balance : Server 01
|