CS5 是 Ctrl + 空白鍵
KennyWriter
PHP 日期相關
<strong>代碼:</strong> mysql> select NOW(), TO_DAYS(NOW()), CURDATE(), TO_DAYS(CURDATE()); +---------------------+----------------+------------+--------------------+ | NOW() | TO_DAYS(NOW()) | CURDATE() | TO_DAYS(CURDATE()) | +---------------------+----------------+------------+--------------------+ | 2007-01-25 13:11:53 | 733066 | 2007-01-25 | 733066 | +---------------------+----------------+------------+--------------------+ 1 row in set (0.00 sec) mysql> select TO_DAYS(NOW())-10, TO_DAYS(CURDATE())-10; +-------------------+-----------------------+ | TO_DAYS(NOW())-10 | TO_DAYS(CURDATE())-10 | +-------------------+-----------------------+ | 733056 | 733056 | +-------------------+-----------------------+ 1 row in set (0.00 sec) mysql> select NOW(), FROM_DAYS(TO_DAYS(NOW())-10), CURDATE(), FROM_DAYS(TO_DAYS(CURDATE())-10); +---------------------+------------------------------+------------+----------------------------------+ | NOW() | FROM_DAYS(TO_DAYS(NOW())-10) | CURDATE() | FROM_DAYS(TO_DAYS(CURDATE())-10) | +---------------------+------------------------------+------------+----------------------------------+ | 2007-01-25 13:12:07 | 2007-01-15 | 2007-01-25 | 2007-01-15 | +---------------------+------------------------------+------------+----------------------------------+ 1 row in set (0.00 sec)
php寫入lunarpages mysql 的伺服器日期格式
<?php echo date (‘Y-n-d G:i:s’,time() + 54000); ?>
ixwebhosting 的是
<?php echo date (‘Y-n-d G:i:s’,time() + 43200); ?>
附註:
54000秒 = 16 個小時
43200秒 = 12 個小時
mysql 亂碼一行解決
採用的方法是在mysql_select_db();前面
放這一行:mysql_query(“SET NAMES ‘utf8′”);
如果沒有 mysql_select_db(); 這一行
放在 require_once();下一行 , 也就是很前面的一兩行好像也行 : )
flash 傳出資料直接寫入資料庫
從 flash 傳出資料時, 用 loadvars 比較好, 因為可以限定要傳哪些變數, 但是要先用變數定義好例如:
var my_lv:LoadVars = new LoadVars();
my_lv.A = this._parent.A;
my_lv.send(“abc.php”,_self,”POST”);
這樣就只會傳出 my_lv 裡面的A
在 dw 這端要省略掉還要按下送出按鈕的方法, 是在 <body> 裡插入一個 js
document.form1.submit();
這樣表格就會自動送出.