想用之和NGINX结合,终结公司混乱的NGINX配置
玩起来先,感觉很精简,很实用哟。
print("hello world") a={1,2} b=a print(a==b,a~=b) a=1 b="abc" c={} d=print print(_VERSION) print(type(a)) print(type(b)) print(type(c)) print(type(d)) a="single ‘quote‘ string and double \"quoteed\"string inside" c=[[ multiem line with ‘single‘ and "double" inside.]] print (c) a,b,c,d,e = 1, 2, "three", "four", 5, 6 print (a,b,c,d,e ) a, b = b, a print ("a="..a,"b="..b,c,d,e ) print "hahahaha" io.write("hehehe") a={} b={1, 2, 3} c={"a", "b", "c"} print (a, b, c) address={} address.Street = "Wyman street" address.StreetNumber = 360 print(address.StreetNumber) a = 1 if a == 1 then print("a is one") else print("a is not on") end a = 1 while a ~= 5 do a = a + 1 io.write(a.." ") end a = 0 repeat a = a + 1 print(a) until a == 5 for a = 1, 4 do io.write(a) end print() for a = 1, 6, 3 do io.write(a) end for xm_key, xm_value in pairs({1, 3, 5, 7}) do print(xm_key, xm_value) end a = 0 while true do a = a + 1 if a == 10 then break end end print(a) function myFunc(a, b, c) return a, b, c, "hello more", 1, true end a, b, c, d, e, f = myFunc(1, 2, "three") print(a, b, c, d, e, f) function printf(fmt, ...) io.write(string.format(fmt, ...)) end printf("hello %s from %s on %s\n", os.getenv"USER" or "there", _VERSION, os.date())
时间: 2024-09-29 23:16:59