Created
July 22, 2013 06:14
-
-
Save WenLiangTseng/6051640 to your computer and use it in GitHub Desktop.
PHP產生一個訂單編號(獨一無二的訂單編號)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$stamp = strtotime("now"); | |
$orderid = $stamp - $_SERVER['REMOTE_ADDR']; | |
$orderid = str_replace(".", "", $orderid); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
您好,
這個做法產生的編號可能回有重複問題,為避免有人從搜尋引擎過來誤用,在此留言敬請見諒。
提供社團的討論串供您參考:
https://www.facebook.com/groups/199493136812961/permalink/734360609992875/