{"id":2641,"date":"2016-03-11T23:08:18","date_gmt":"2016-03-11T15:08:18","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=2641"},"modified":"2016-03-11T23:08:18","modified_gmt":"2016-03-11T15:08:18","slug":"lua%e7%9a%84%e7%ae%80%e5%8d%95%e5%ad%a6%e4%b9%a0","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/2641.html","title":{"rendered":"Lua\u7684\u7b80\u5355\u5b66\u4e60"},"content":{"rendered":"<p>=Start=<\/p>\n<h5>\u7f18\u7531\uff1a<\/h5>\n<p>\u9879\u76ee\u9700\u8981\u3002<\/p>\n<h5>\u5185\u5bb9\uff1a<\/h5>\n<h6>0.Lua\u662f\u4ec0\u4e48\uff1f<\/h6>\n<p>Lua \u662f\u4e00\u79cd\u8f7b\u91cf\u5c0f\u5de7\u7684\u811a\u672c\u8bed\u8a00\uff0c\u7528\u6807\u51c6C\u8bed\u8a00\u7f16\u5199\u5e76\u4ee5\u6e90\u4ee3\u7801\u5f62\u5f0f\u5f00\u653e\uff0c \u5176\u8bbe\u8ba1\u76ee\u7684\u662f\u4e3a\u4e86\u5d4c\u5165\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u4ece\u800c\u4e3a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u7075\u6d3b\u7684\u6269\u5c55\u548c\u5b9a\u5236\u529f\u80fd\u3002<\/p>\n<h6>1.Lua\u7684\u5b89\u88c5<\/h6>\n<pre class=\"lang:default decode:true\">curl -R -O http:\/\/www.lua.org\/ftp\/lua-5.3.2.tar.gz\ntar zxf lua-5.3.2.tar.gz\ncd lua-5.3.2\n\n# Linux\nmake linux\nsudo make install\n\n# Mac\nmake macosx\nsudo make install<\/pre>\n<h6>2.Lua\u7684\u8bed\u6cd5<\/h6>\n<p>01.<span style=\"color: #ff0000;\"><strong>Lua \u662f\u4e00\u4e2a\u533a\u5206\u5927\u5c0f\u5199\u7684\u7f16\u7a0b\u8bed\u8a00\u3002<\/strong><\/span>\u56e0\u6b64\u5728 Lua \u4e2d CrazyOf \u4e0e crazyof \u662f\u4e24\u4e2a\u4e0d\u540c\u7684\u6807\u8bc6\u7b26\u3002<\/p>\n<p>02.Lua\u7684\u6ce8\u91ca<\/p>\n<pre class=\"lang:default decode:true\">\u5355\u884c\u6ce8\u91ca\n-- \u4e24\u4e2a\u51cf\u53f7\u5f00\u5934\u7684\u662f\u5355\u884c\u6ce8\u91ca\n\n\u591a\u884c\u6ce8\u91ca\n--[[\n \u8fd9\u91cc\u662f\u591a\u884c\u6ce8\u91ca\n \u8fd9\u91cc\u662f\u591a\u884c\u6ce8\u91ca\n--]]<\/pre>\n<p>03.Lua\u7684\u53d8\u91cf<\/p>\n<p>Lua \u7684\u53d8\u91cf\u6709\u4e09\u79cd\u7c7b\u578b\uff1a\u5168\u5c40\u53d8\u91cf\u3001\u5c40\u90e8\u53d8\u91cf\u3001\u8868\u4e2d\u7684\u57df\u3002<br \/>\n<span style=\"color: #ff0000;\"><strong>\u51fd\u6570\u5916\u7684\u53d8\u91cf\u9ed8\u8ba4\u4e3a\u5168\u5c40\u53d8\u91cf\uff0c\u9664\u975e\u7528 local \u663e\u793a\u58f0\u660e\uff08\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53d8\u91cf\u603b\u662f\u8ba4\u4e3a\u662f\u5168\u5c40\u7684\uff09<\/strong><\/span>\u3002\u51fd\u6570\u5185\u53d8\u91cf\u4e0e\u51fd\u6570\u7684\u53c2\u6570\u9ed8\u8ba4\u4e3a\u5c40\u90e8\u53d8\u91cf\u3002<br \/>\n\u5c40\u90e8\u53d8\u91cf\u7684\u4f5c\u7528\u57df\u4e3a\u4ece\u58f0\u660e\u4f4d\u7f6e\u5f00\u59cb\u5230\u6240\u5728\u8bed\u53e5\u5757\u7ed3\u675f\uff08\u6216\u8005\u662f\u76f4\u5230\u4e0b\u4e00\u4e2a\u540c\u540d\u5c40\u90e8\u53d8\u91cf\u7684\u58f0\u660e\uff09\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u53d8\u91cf\u7684\u9ed8\u8ba4\u503c\u5747\u4e3a nil\u3002<\/strong><\/span><\/p>\n<p>\u5168\u5c40\u53d8\u91cf\u4e0d\u9700\u8981\u58f0\u660e\uff0c\u7ed9\u4e00\u4e2a\u53d8\u91cf\u8d4b\u503c\u540e\u5373\u521b\u5efa\u4e86\u8fd9\u4e2a\u5168\u5c40\u53d8\u91cf\uff0c\u8bbf\u95ee\u4e00\u4e2a\u6ca1\u6709\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf\u4e5f\u4e0d\u4f1a\u51fa\u9519\uff0c\u53ea\u4e0d\u8fc7\u5f97\u5230\u7684\u7ed3\u679c\u662f\uff1anil\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u5982\u679c\u4f60\u60f3\u5220\u9664\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\uff0c\u53ea\u9700\u8981\u5c06\u53d8\u91cf\u8d4b\u503c\u4e3anil<\/strong><\/span>\u3002\u8fd9\u6837\u53d8\u91cf\u5c31\u597d\u50cf\u4ece\u6ca1\u88ab\u4f7f\u7528\u8fc7\u4e00\u6837\u3002\u6362\u53e5\u8bdd\u8bf4, <span style=\"color: #ff0000;\"><strong>\u5f53\u4e14\u4ec5\u5f53\u4e00\u4e2a\u53d8\u91cf\u4e0d\u7b49\u4e8enil\u65f6\uff0c\u8fd9\u4e2a\u53d8\u91cf\u5373\u5b58\u5728<\/strong><\/span>\u3002<\/p>\n<p>04.Lua \u7684\u6570\u636e\u7c7b\u578b<\/p>\n<p><span style=\"color: #0000ff;\">Lua\u662f\u52a8\u6001\u7c7b\u578b\u8bed\u8a00\uff0c\u53d8\u91cf\u4e0d\u8981\u7c7b\u578b\u5b9a\u4e49\uff0c\u53ea\u9700\u8981\u4e3a\u53d8\u91cf\u8d4b\u503c\u3002\u503c\u53ef\u4ee5\u5b58\u50a8\u5728\u53d8\u91cf\u4e2d\uff0c\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u6216\u7ed3\u679c\u8fd4\u56de\u3002<\/span><\/p>\n<p><strong>Lua\u4e2d\u67098\u4e2a\u57fa\u672c\u7c7b\u578b\uff0c\u5206\u522b\u4e3a\uff1anil\u3001boolean\u3001number\u3001string\u3001userdata\u3001function\u3001thread\u548ctable<\/strong>\u3002<span style=\"color: #ff0000;\">\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528type\u51fd\u6570\u6d4b\u8bd5\u7ed9\u5b9a\u53d8\u91cf\u6216\u8005\u503c\u7684\u7c7b\u578b<\/span>\u3002<\/p>\n<pre class=\"lang:default decode:true\">nil         # nil\u7c7b\u578b\u8868\u793a\u4e00\u79cd\u6ca1\u6709\u4efb\u4f55\u6709\u6548\u503c\uff0c\u5b83\u53ea\u6709\u4e00\u4e2a\u503c\u5373nil\uff1b\u5bf9\u4e8e\u5168\u5c40\u53d8\u91cf\u548c table\uff0cnil \u8fd8\u6709\u4e00\u4e2a\"\u5220\u9664\"\u4f5c\u7528\nboolean     # true \/ false\nnumber      # \u53cc\u7cbe\u5ea6\nstring      # \u5355\u5f15\u53f7\u3001\u53cc\u5f15\u53f7\u30012\u4e2a\u65b9\u62ec\u53f7\nuserdata    # \u4e00\u79cd\u7528\u6237\u81ea\u5b9a\u4e49\u6570\u636e\nfunction    # \u51fd\u6570\nthread      #\ntable       # Lua \u4e2d\u7684\u8868\uff08table\uff09\u5176\u5b9e\u662f\u4e00\u4e2a\"\u5173\u8054\u6570\u7ec4\"\uff08associative arrays\uff09\uff0c\u6570\u7ec4\u7684\u7d22\u5f15\u53ef\u4ee5\u662f\u6570\u5b57\u6216\u8005\u662f\u5b57\u7b26\u4e32\u3002<\/pre>\n<p>05.Lua \u5faa\u73af<\/p>\n<p>Lua \u8bed\u8a00\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u51e0\u79cd\u5faa\u73af\u5904\u7406\u65b9\u5f0f\uff1a<\/p>\n<p style=\"padding-left: 30px;\"><strong>while\u5faa\u73af<\/strong>\uff1a\u5728\u6761\u4ef6\u4e3a true \u65f6\uff0c\u8ba9\u7a0b\u5e8f\u91cd\u590d\u5730\u6267\u884c\u67d0\u4e9b\u8bed\u53e5\u3002\u6267\u884c\u8bed\u53e5\u524d\u4f1a\u5148\u68c0\u67e5\u6761\u4ef6\u662f\u5426\u4e3a true\u3002<br \/>\n<span style=\"color: #ff0000;\"><strong>for\u5faa\u73af<\/strong><\/span>\uff1a\u91cd\u590d\u6267\u884c\u6307\u5b9a\u8bed\u53e5\uff0c\u91cd\u590d\u6b21\u6570\u53ef\u5728 for \u8bed\u53e5\u4e2d\u63a7\u5236\u3002<br \/>\n<strong>repeat&#8230;until\u5faa\u73af<\/strong>\uff1a\u91cd\u590d\u6267\u884c\u5faa\u73af\uff0c\u76f4\u5230\u6307\u5b9a\u7684\u6761\u4ef6\u4e3a\u771f\u65f6\u4e3a\u6b62\u3002<\/p>\n<pre class=\"lang:default decode:true\">while(condition) do\n    statements\nend\n\nfor var=first, last, step do\n    statements\nend\n\nfor i, v in ipairs(a) do\n    print(i, v)\nend\n\nfor k, v in pairs(a) do\n    print(k, v)\nend\n\nrepeat\n    statements\nwhile( condition )<\/pre>\n<p>06.Lua \u7684\u63a7\u5236\u7ed3\u6784<\/p>\n<p style=\"padding-left: 30px;\">if\u8bed\u53e5<br \/>\nif&#8230;else\u8bed\u53e5<br \/>\nif\u5d4c\u5957\u8bed\u53e5<\/p>\n<p><strong>\u63a7\u5236\u7ed3\u6784\u7684\u6761\u4ef6\u8868\u8fbe\u5f0f\u7ed3\u679c\u53ef\u4ee5\u662f\u4efb\u4f55\u503c\uff0c<span style=\"color: #ff0000;\">Lua\u8ba4\u4e3afalse\u548cnil\u4e3a\u5047\uff0ctrue \u548c\u975enil\u4e3a\u771f<\/span>\u3002<\/strong><\/p>\n<pre class=\"lang:default decode:true\">if(\u5e03\u5c14\u8868\u8fbe\u5f0f) then\n    --[ \u5728\u5e03\u5c14\u8868\u8fbe\u5f0f\u4e3a true \u65f6\u6267\u884c\u7684\u8bed\u53e5 --]\nend\n\nif(\u5e03\u5c14\u8868\u8fbe\u5f0f) then\n    --[ \u5728\u5e03\u5c14\u8868\u8fbe\u5f0f\u4e3a true \u65f6\u6267\u884c\u7684\u8bed\u53e5 --]\nelse\n    --[ \u5728\u5e03\u5c14\u8868\u8fbe\u5f0f\u4e3a false \u65f6\u6267\u884c\u7684\u8bed\u53e5 --]\nend\n\nif( \u5e03\u5c14\u8868\u8fbe\u5f0f 1) then\n    --[ \u5728\u5e03\u5c14\u8868\u8fbe\u5f0f 1 \u4e3a true \u65f6\u6267\u884c\u8be5\u8bed\u53e5\u5757 --]\nelse if( \u5e03\u5c14\u8868\u8fbe\u5f0f 2)\n    --[ \u5728\u5e03\u5c14\u8868\u8fbe\u5f0f 2 \u4e3a true \u65f6\u6267\u884c\u8be5\u8bed\u53e5\u5757 --]\nelse if( \u5e03\u5c14\u8868\u8fbe\u5f0f 3)\n    --[ \u5728\u5e03\u5c14\u8868\u8fbe\u5f0f 3 \u4e3a true \u65f6\u6267\u884c\u8be5\u8bed\u53e5\u5757 --]\nelse\n    --[ \u5982\u679c\u4ee5\u4e0a\u5e03\u5c14\u8868\u8fbe\u5f0f\u90fd\u4e0d\u4e3a true \u5219\u6267\u884c\u8be5\u8bed\u53e5\u5757 --]\nend<\/pre>\n<p>07.Lua \u51fd\u6570\u5b9a\u4e49<\/p>\n<p>Lua \u7f16\u7a0b\u8bed\u8a00\u51fd\u6570\u5b9a\u4e49\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:default decode:true \">-- Lua \u7f16\u7a0b\u8bed\u8a00\u51fd\u6570\u5b9a\u4e49\u683c\u5f0f\u5982\u4e0b\uff1a\n[local] function function_name( argument1, argument2, argument3..., argumentn)\n    function_body\n    return result_params_comma_separated\nend<\/pre>\n<p><span style=\"color: #ff0000;\"><strong>\u53ef\u53d8\u53c2\u6570<\/strong><\/span><\/p>\n<p>Lua\u51fd\u6570\u53ef\u4ee5\u63a5\u53d7\u53ef\u53d8\u6570\u76ee\u7684\u53c2\u6570\uff0c\u548cC\u8bed\u8a00\u7c7b\u4f3c\u5728\u51fd\u6570\u53c2\u6570\u5217\u8868\u4e2d\u4f7f\u7528\u4e09\u70b9(&#8230;)\u8868\u793a\u51fd\u6570\u6709\u53ef\u53d8\u7684\u53c2\u6570\u3002<span style=\"color: #ff0000;\">Lua\u5c06\u51fd\u6570\u7684\u53c2\u6570\u653e\u5728\u4e00\u4e2a\u53ebarg\u7684\u8868\u4e2d\uff0c#arg \u8868\u793a\u4f20\u5165\u53c2\u6570\u7684\u4e2a\u6570<\/span>\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u6211\u4eec\u8ba1\u7b97\u51e0\u4e2a\u6570\u7684\u5e73\u5747\u503c\uff1a<\/p>\n<pre class=\"lang:default decode:true \">function average(...)\n   result = 0\n   local arg={...}\n   for i,v in ipairs(arg) do\n      result = result + v\n   end\n   print(\"\u603b\u5171\u4f20\u5165 \" .. #arg .. \" \u4e2a\u6570\")\n   return result\/#arg\nend\nprint(\"\u5e73\u5747\u503c\u4e3a\", average(10,5,3,4,5,6))<\/pre>\n<p><span style=\"color: #ff0000;\"><strong>\u591a\u8fd4\u56de\u503c<\/strong><\/span><\/p>\n<p>\u5728Lua\u51fd\u6570\u4e2d\uff0c\u5728return\u540e\u5217\u51fa\u8981\u8fd4\u56de\u7684\u503c\u7684\u5217\u8868\u5373\u53ef\u8fd4\u56de\u591a\u503c\u3002<\/p>\n<p>08.Lua \u8fd0\u7b97\u7b26<\/p>\n<p>\u8fd0\u7b97\u7b26\u662f\u4e00\u4e2a\u7279\u6b8a\u7684\u7b26\u53f7\uff0c\u7528\u4e8e\u544a\u8bc9\u89e3\u91ca\u5668\u6267\u884c\u7279\u5b9a\u7684\u6570\u5b66\u6216\u903b\u8f91\u8fd0\u7b97\u3002Lua\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u51e0\u79cd\u8fd0\u7b97\u7b26\u7c7b\u578b\uff1a<\/p>\n<p style=\"padding-left: 30px;\">\u7b97\u672f\u8fd0\u7b97\u7b26(\u52a0\u51cf\u4e58\u9664\u3001\u53d6\u4f59\u3001\u5e42\u3001\u8d1f\u53f7)<br \/>\n\u5173\u7cfb\u8fd0\u7b97\u7b26(<span style=\"color: #ff0000;\"><strong>\u4e0d\u7b49\u4e8e ~=<\/strong><\/span>)<br \/>\n\u903b\u8f91\u8fd0\u7b97\u7b26(and \/ or \/ not)<br \/>\n\u5176\u4ed6\u8fd0\u7b97\u7b26([..]\u8fde\u63a5\u4e24\u4e2a\u5b57\u7b26\u4e32\uff0c[#]\u8fd4\u56de\u5b57\u7b26\u4e32\u6216\u8868\u7684\u957f\u5ea6)<\/p>\n<p>09.Lua \u5b57\u7b26\u4e32<\/p>\n<p>Lua \u4e2d\u7684\u5b57\u7b26\u4e32\u6216\u4e32(String)\u662f\u7531\u6570\u5b57\u3001\u5b57\u6bcd\u3001\u4e0b\u5212\u7ebf\u7ec4\u6210\u7684\u4e00\u4e32\u5b57\u7b26\u3002Lua \u8bed\u8a00\u4e2d\u5b57\u7b26\u4e32\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4e09\u79cd\u65b9\u5f0f\u6765\u8868\u793a\uff1a<\/p>\n<p style=\"padding-left: 30px;\">\u5355\u5f15\u53f7\u95f4\u7684\u4e00\u4e32\u5b57\u7b26<br \/>\n\u53cc\u5f15\u53f7\u95f4\u7684\u4e00\u4e32\u5b57\u7b26<br \/>\n[[\u548c]]\u95f4\u7684\u4e00\u4e32\u5b57\u7b26 \u00a0#\u4e00\u822c\u7528\u4e8e\u8868\u793a\u591a\u884c\u5b57\u7b26\u4e32<\/p>\n<p>\u5404\u79cd\u5b57\u7b26\u4e32\u64cd\u4f5c\u4ee5\u53ca\u5bf9\u5e94\u7684\u5185\u7f6e\u51fd\u6570\uff08string.upper(str)<br \/>\nstring.lower(str)<br \/>\nstring.reverse(str)<br \/>\nstring.strfind (str, substr, [init, [end]])<br \/>\nstring.gsub(mainString, findString, replaceString, num)<br \/>\nstring.format(&#8230;)\uff09\u3002<\/p>\n<p>0x.<span style=\"color: #ff0000;\"><strong>Lua \u4e2d\u7684table<\/strong><\/span><\/p>\n<p>table \u662f Lua \u7684\u4e00\u79cd\u6570\u636e\u7ed3\u6784\u7528\u6765\u5e2e\u52a9\u6211\u4eec\u521b\u5efa\u4e0d\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5982\uff1a\u6570\u5b57\u3001\u5b57\u5178\u7b49\u3002<br \/>\nLua table \u4f7f\u7528\u5173\u8054\u578b\u6570\u7ec4\uff0c\u4f60\u53ef\u4ee5\u7528\u4efb\u610f\u7c7b\u578b\u7684\u503c\u6765\u4f5c\u6570\u7ec4\u7684\u7d22\u5f15\uff0c\u4f46\u8fd9\u4e2a\u503c\u4e0d\u80fd\u662f nil\u3002<br \/>\nLua table \u662f\u4e0d\u56fa\u5b9a\u5927\u5c0f\u7684\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u9700\u8981\u8fdb\u884c\u6269\u5bb9\u3002<br \/>\nLua\u4e5f\u662f\u901a\u8fc7table\u6765\u89e3\u51b3\u6a21\u5757\uff08module\uff09\u3001\u5305\uff08package\uff09\u548c\u5bf9\u8c61\uff08Object\uff09\u7684\u3002<\/p>\n<p>\u5e38\u7528\u7684table\u64cd\u4f5c\uff1a<\/p>\n<ul>\n<li>table.concat(table [, step [, start [, end]]]) # \u7528sep\u7b26\u53f7\u8fde\u63a5table\u5143\u7d20<\/li>\n<li>table.insert(table, [pos,] value) # \u5728table\u4e2d\u7684\u6307\u5b9a\u4f4d\u7f6e\u8fdb\u884c\u63d2\u5165<\/li>\n<li>table.remove(table [, pos]) # \u5220\u9664table\u4e2d\u6307\u5b9a\u4f4d\u7f6e\u7684\u5143\u7d20<\/li>\n<li>table.sort(table [, comp]) # \u5bf9\u7ed9\u5b9a\u7684table\u8fdb\u884c\u5347\u5e8f\u6392\u5e8f<\/li>\n<\/ul>\n<p>\u5bf9Lua\u4e2d\u7684table\u4e0d\u592a\u7406\u89e3\u7684\u5730\u65b9\uff1a<\/p>\n<figure id=\"attachment_2643\" aria-describedby=\"caption-attachment-2643\" style=\"width: 798px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2016\/03\/lua_table_length.png\" rel=\"attachment wp-att-2643\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2643\" src=\"http:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2016\/03\/lua_table_length.png\" alt=\"Lua\u4e2dtable\u7684\u957f\u5ea6\u5230\u5e95\u662f\u600e\u4e48\u7b97\u7684\uff1f\" width=\"798\" height=\"1124\" \/><\/a><figcaption id=\"caption-attachment-2643\" class=\"wp-caption-text\">Lua\u4e2dtable\u7684\u957f\u5ea6\u5230\u5e95\u662f\u600e\u4e48\u7b97\u7684\uff1f<\/figcaption><\/figure>\n<h6>3.Lua\u7684\u5e94\u7528<\/h6>\n<ul>\n<li>\u6e38\u620f\u5f00\u53d1<\/li>\n<li>\u72ec\u7acb\u5e94\u7528\u811a\u672c<\/li>\n<li>\u6269\u5c55\u548c\u63d2\u4ef6\u5982\uff1aNmap \/ Wireshark \/ &#8230;<\/li>\n<li>Lua+Nginx\u7ec4\u5408\uff1aWAF \/ OpenResty \/ &#8230;<\/li>\n<\/ul>\n<h5>\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n<h6>Lua\u6559\u7a0b<\/h6>\n<p><a href=\"http:\/\/coolshell.cn\/articles\/10739.html\" target=\"_blank\">http:\/\/coolshell.cn\/articles\/10739.html<\/a><br \/>\n<a href=\"http:\/\/www.runoob.com\/lua\/lua-tutorial.html\" target=\"_blank\">http:\/\/www.runoob.com\/lua\/lua-tutorial.html<\/a><br \/>\n<a href=\"http:\/\/www.lua.org\/pil\/1.html\" target=\"_blank\">http:\/\/www.lua.org\/pil\/1.html<\/a><br \/>\n<a href=\"http:\/\/wiki.jikexueyuan.com\/project\/lua\/\" target=\"_blank\">http:\/\/wiki.jikexueyuan.com\/project\/lua\/<\/a><br \/>\n<a href=\"https:\/\/www.ttlsa.com\/lua\/\" target=\"_blank\">https:\/\/www.ttlsa.com\/lua\/<\/a><br \/>\n<a href=\"https:\/\/wizardforcel.gitbooks.io\/w3school-lua\/content\/\" target=\"_blank\">https:\/\/wizardforcel.gitbooks.io\/w3school-lua\/content\/<\/a><br \/>\n<a href=\"https:\/\/zh.wikipedia.org\/zh-cn\/Lua\" target=\"_blank\">https:\/\/zh.wikipedia.org\/zh-cn\/Lua<\/a><br \/>\n<a href=\"http:\/\/www.phailed.me\/2011\/02\/learn-lua-the-hard-way-1\/\" target=\"_blank\">http:\/\/www.phailed.me\/2011\/02\/learn-lua-the-hard-way-1\/<\/a><\/p>\n<h6>Awesome Lua<\/h6>\n<p><a href=\"https:\/\/github.com\/LewisJEllis\/awesome-lua\" target=\"_blank\">https:\/\/github.com\/LewisJEllis\/awesome-lua<\/a><br \/>\n<a href=\"https:\/\/github.com\/forhappy\/awesome-lua\" target=\"_blank\">https:\/\/github.com\/forhappy\/awesome-lua<\/a><\/p>\n<h6>Nginx\u548cLua<\/h6>\n<p><a href=\"https:\/\/github.com\/openresty\/lua-nginx-module\" target=\"_blank\">https:\/\/github.com\/openresty\/lua-nginx-module<\/a><br \/>\n<a href=\"https:\/\/openresty.org\/download\/agentzh-nginx-tutorials-zhcn.html\" target=\"_blank\">https:\/\/openresty.org\/download\/agentzh-nginx-tutorials-zhcn.html<\/a><br \/>\n<a href=\"http:\/\/huoding.com\/2012\/08\/31\/156\" target=\"_blank\">http:\/\/huoding.com\/2012\/08\/31\/156<\/a><br \/>\n<a href=\"http:\/\/wulijun.github.io\/2012\/09\/04\/nginx-lua.html\" target=\"_blank\">http:\/\/wulijun.github.io\/2012\/09\/04\/nginx-lua.html<\/a><\/p>\n<h6>OpenResty<\/h6>\n<p><a href=\"https:\/\/moonbingbing.gitbooks.io\/openresty-best-practices\/content\/ngx_lua\/lua-limit.html\" target=\"_blank\">https:\/\/moonbingbing.gitbooks.io\/openresty-best-practices\/content\/ngx_lua\/lua-limit.html<\/a><br \/>\n<a href=\"https:\/\/www.centos.bz\/2012\/12\/openresty-nginx-block-cc-attack-deploy\/\" target=\"_blank\">https:\/\/www.centos.bz\/2012\/12\/openresty-nginx-block-cc-attack-deploy\/<\/a><\/p>\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u9879\u76ee\u9700\u8981\u3002 \u5185\u5bb9\uff1a 0.Lua\u662f\u4ec0\u4e48\uff1f Lua \u662f\u4e00\u79cd\u8f7b\u91cf\u5c0f\u5de7\u7684\u811a\u672c\u8bed\u8a00\uff0c\u7528\u6807\u51c6C\u8bed\u8a00 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,7,12],"tags":[592,496],"class_list":["post-2641","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-programing","category-tools","tag-lua","tag-tutorial"],"views":4363,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=2641"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2641\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=2641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=2641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=2641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}