|
 |
|
แนะนำหน่อยครับ เกี่ยวกับปฏิทินครับ คือว่าผมได้ลองเขียน code ดูแล้ว แต่ว่าผมอยากจะให้แสดงเหมือนปฏิทิน อะแต่เริ่มไม่ถูกว่าจะทำยังไงครับ |
|
 |
|
|
 |
 |
|
คือว่าผมได้ลองเขียน code ดูแล้ว แต่ว่าผมอยากจะให้แสดงเหมือนปฏิทิน อะแต่เริ่มไม่ถูกว่าจะทำยังไงครับ ขอคำแนะนำทีครับ
Code (PHP)
<?
$d7=$qd[date('d')];
$_month=date('m');
for($d=$start; $d<=$end; $d+=$date_second)
{
$coolmonth=date("$setMonth/$d/$myear");
$dateone=date('j',$d);//////แสดงวันที่จากวันที่ 27-26
$dbday=date("D",strtotime($coolmonth));
$month=date('m');///ให้เช็คด้วยว่าถ้ามีการว่างจากค่าที่ส่งมา ให้ ทำการเปลี่ยนแปลงเดือนเป็นเดือนปัจจุบัน
$month_2=($month-1);
$date_second = 24*60*60;
$dayTH = array("อ.", "จ.", "อัง.", "พุธ.", "พฤ.", "ศ.", "ส.");
$dayEn = array("Sun.", "Mon.", "Tue.", "Wed.", "Thu.", "Fri.", "Sat.");
//$start = mktime(0, 0, 0,$_month_1,27,date('y')); // ค่าตรงนี้ของคุณผิดมั้งครับ
//$end = mktime(0,0,0,$_month,26,date('y')); /// ค่าตรงนี้ของคุณมันผิดมันก้อเลยไม่ตรง ผมลองเปลี่ยนเป็นด้านล่างหน่ะได้เลยครับ จากวันที่ 27 เดือนนี้ ถึง 26 เดือนหน้า
$start = mktime(0, 0, 0,$month_2,27,date('y'));
$end = mktime(0,0,0,$month,26,date('y'));
for($d=$start; $d<=$end; $d+=$date_second)
{
$coolmonth=date("$setMonth/$d/$myear");
$dateone=date('d',$d);//////แสดงวันที่จากวันที่ 27-26
$dateone=date('d',$d);
$day =date('w',$d);
$day1=$dayTH[$day];
$day2=($dayEn[$day]);
}
}
?>
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2010-05-29 11:15:56 |
By :
SOUL |
View :
715 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มีโค้ดเต็มๆมั้ยครับ
|
 |
 |
 |
 |
Date :
2010-05-29 14:56:31 |
By :
kerb |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|