step1:下载安装压缩包
wget http://www.lua.org/ftp/lua-5.3.0.tar.gz
step2:解压安装包
tar -zxvf lua-5.3.0.tar.gz
step3:进入lua-5.3.0 目录
step4:
make linux test
此时我们发现它编译报错了,这是因为它缺少
l ...……
/usr/local/share/lua/5.1/kong/cmd/start.lua:34: the current database schema does not match this version of Kong. Please run `kong migrations up` to update/initialize the database sche……
泛型遍历无法保证顺序,如
a={
=1,
=true,
=20,
=30,
}
for k,v in pairs(a) do
print(k,v)
end
ipairs只遍历数组:
a={
=1,
=true,
=20,
=30,
}
for k,v in ipairs(a) do
print(k,v)end……