Lua

基本教學 http://www.runoob.com/lua/lua-tutorial.html http://www.runoob.com/manual/lua53doc/contents.html

Nginx套件安裝 Source Code 安裝 https://openresty.org/cn/download.html 套件安裝 https://openresty.org/cn/linux-packages.html 第三方模組安裝 https://www.nginx.com/resources/wiki/modules/index.html

參考資料 Nginx安裝 https://openresty.org/cn/installation.html Lua設定 Nginx教程 OpenResty最佳實踐 lua-nginx-module Lua入門

Nginx + Lua

https://moonbingbing.gitbooks.io/openresty-best-practices/content/openresty/helloworld.html

lua_code_cache off 開發時期用

常用Lua API

https://cloudwu.github.io/lua53doc/manual.html
nginx lua module : https://www.nginx.com/resources/wiki/modules/lua/


lua_code_cache off

  • string
    string.gsub(mainString,findString,replaceString,num)
    在字符串中替换,mainString为要替换的字符串, findString 为被替换的字符,replaceString 要替换的字符,num 替换次数(可以忽略,则全部替换),如:
    > string.gsub("aaaa","a","z",3);
    zzza    3
    

results matching ""

    No results matching ""