Support
Web Programming
(083) 0466100
Your shopping cart
ดูตะกร้าสินค้าของคุณ
ไม่มีสินค้าในตะกร้าของคุณ

ปรึกษาเรือ่ง php หน่อยครับ

วันที่: 2011-02-16 19:17:30.0view 6389reply 0

ฐนพงศ์ รักษาวงศ์

ตอนนี้ผมหัดทำเว็บเรื่อง เวลา ใช้คำสั่ง

<?php

$today = date("Y-m-d");

echo Today is: $today ;

พอให้แสดงใน aptana ได้คือ Today is:2011-02-16

แต่พอให้แสดงใน localhost กลับได้ผลแบบนี้

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\AppServ\www\leandphp\date.php on line 2 Today is: 2011-02-16

ที่นี้ทดลองแก้ไขตรง date

$today = date_default_timezone_set("Y-m-d");

ผลที่แสดงใน localhost กลับได้แค่นี้เองครับ

Today is:

และไม่มีอะไรแสดงอีกเลยครับ มันเกิดอะไรขึ้นเนี่ย แล้วผมต้องแก้ยังไงดีครับ แนะนำด้วยครับ

ขอบคุณครับ

โควท

ความคิดเห็น

วันที่: Tue May 07 14:02:25 ICT 2024

แสดงความคิดเห็น
All Replys: 0   Pages: 1/0