{"id":60922,"date":"2025-04-26T08:40:21","date_gmt":"2025-04-26T00:40:21","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60922\/"},"modified":"2025-04-26T08:40:21","modified_gmt":"2025-04-26T00:40:21","slug":"%e8%ae%be%e7%bd%aezencart%e8%ae%a2%e5%8d%95%e5%8f%b7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60922\/","title":{"rendered":"\u8bbe\u7f6ezencart\u8ba2\u5355\u53f7"},"content":{"rendered":"<p> \u6309zencart\u65f6\u95f4\u52a0\u968f\u673a\u6570\u4ea7\u751f\u8ba2\u5355includesclassesorder.php:<br \/> 1\u3001\u628aorders\u5b57\u6bb5\u4e2dorders_id \u7684 Auto_increment \u5173\u95ed\uff0c\u5e76\u628a\u5b57\u6bb5INT\u6539\u4e3aBIGINT\uff08\u6839\u636e\u8ba2\u5355\u4f4d\u6570\u8bbe\u7f6e\u5408\u7406\u7c7b\u578b\u957f\u5ea6\uff09\uff1b<\/p>\n<p> 2\u3001\u628a\u4ee5\u4e0b\u4ee3\u7801\u63d2\u5165\u5230order.php\u4e2d;<br \/> \u67e5\u627e\uff1a<\/p>\n<pre>\r\nfunction create($zf_ot_modules, $zf_mode = 2) {\r\nglobal $db;<\/pre>\n<p> \u63d2\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<br \/> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br \/> \uff08\u65b9\u6cd5\u4e00\uff1a\uff09<\/p>\n<pre>\r\n$t1 = date(\u201cYmdGis\u201d); \/\/\u65f6\u95f4\u4e3a\u5e74\u6708\u65e5\u65f6\u5206\u79d2,\u53bb\u6389Gis\u4e3a\u5e74\u6708\u65e5\uff0c\u5373\uff1a$t1=date(\u201cYmd\u201d);\r\nsrand ((float) microtime() * 10000000);\r\n$input = array (\u201c1\u2033, \u201c2\u2033, \u201c3\u2033, \u201c4\u2033, \u201c5\u2033, \u201c6\u2033, \u201c7\u2033, \u201c8\u2033, \u201c9\u2033, \u201c0\u2033);\r\n$rand_keys = array_rand ($input, 2);\r\n$l1 = $input;\r\n$l2 = $input;\r\n$r1 = rand(0,9);\r\n\r\n$ordernum = $t1.$l1.$l2.$r1; \/\/\u987a\u4fbf\u628a$11.$12\u53bb\u6389\u4ee5\u51cf\u5c11\u8ba2\u5355\u4f4d\u6570,\u5373:$ordernum=$t1.$r1;<\/pre>\n<p> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br \/> \uff08\u65b9\u6cd5\u4e8c\uff09\u53ef\u628a\u4e0a\u9762\u6362\u6210\uff1a<\/p>\n<pre>\r\n$t1 = date(\u201cYmdGis\u201d); \/\/\u4e3a\u51cf\u5c11\u91cd\u590d\u5355\u7684\u60c5\u51b5\uff0c\u8bbe\u7f6e\u4e3a\u83b7\u53d6\u65f6\u5206\u79d2\r\n$r1 = rand(0,9);\r\n$r2 = rand(0,9);\r\n$ordernum = $t1.$r1.$r2;<\/pre>\n<p> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br \/> \u5728\u8fd9\u91cc\u6dfb\u52a0orders_id\u5b57\u6bb5\uff0c\u624b\u5de5\u63d2\u5165\uff1a<\/p>\n<pre>\r\n$sql_data_array = array(\u2018orders_id\u2019 =&gt; $ordernum,<\/pre>\n<p> \u67e5\u627e\uff1a<\/p>\n<pre>\r\nzen_db_perform(TABLE_ORDERS, $sql_data_array);<\/pre>\n<p> \u63d2\u5165\uff1a<\/p>\n<pre>\r\n\/*\u4fee\u6539\u539f\u6765\u7684\u8c03\u7528\u81ea\u52a8\u63d2\u5165\u51fd\u6570\u4e3a$ordernum\u53d8\u91cf*\/\r\n$insert_id = $ordernum;<\/pre>\n<p> \u5b8c\u6210\uff0c\u83b7\u53d6\u7684\u8ba2\u5355\u4f4d\u6570\u4e3a16\u4f4d\uff0c1-8\u4f4d\u4e3a\uff1a\u5e74\u6708\u65e5\uff0c9-14\u4f4d\u4e3a\u65f6\u5206\u79d2\uff0c15-16\u4f4d\u4e3a\u968f\u673a2\u4f4d\u6570<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6309zencart\u65f6\u95f4\u52a0\u968f\u673a\u6570\u4ea7\u751f\u8ba2\u5355includesclassesorder.php: 1\u3001\u628aorders\u5b57\u6bb5\u4e2dorders_id \u7684 Auto_increment \u5173\u95ed\uff0c\u5e76\u628a\u5b57\u6bb5INT\u6539\u4e3aBIGINT\uff08\u6839\u636e\u8ba2\u5355\u4f4d\u6570\u8bbe\u7f6e\u5408\u7406\u7c7b\u578b\u957f\u5ea6\uff09\uff1b 2\u3001\u628a\u4ee5\u4e0b\u4ee3\u7801\u63d2\u5165\u5230order.php\u4e2d; \u67e5\u627e\uff1a function create($zf_ot_modules, $zf_mode = 2) { global $db; \u63d2\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \uff08\u65b9\u6cd5\u4e00\uff1a\uff09 $t1 = date(\u201cYmdGis\u201d); \/\/\u65f6\u95f4\u4e3a\u5e74\u6708\u65e5\u65f6\u5206\u79d2,\u53bb\u6389Gis\u4e3a\u5e74\u6708\u65e5\uff0c\u5373\uff1a$t1=date(\u201cYmd\u201d); srand ((float) microtime() * 10000000); $input = array (\u201c1\u2033, \u201c2\u2033, \u201c3\u2033, \u201c4\u2033, \u201c5\u2033, \u201c6\u2033, \u201c7\u2033, \u201c8\u2033, \u201c9\u2033, \u201c0\u2033); $rand_keys = array_rand ($input, 2); $l1 = $input; $l2 = $input; $r1 = rand(0,9); $ordernum [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-60922","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=60922"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60922\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}