Post your best Lua script examples here

User avatar
By gerardwr
#7863
ozayturay wrote:Good catch. The files are saved in UTF-8 encoding, changing encoding to UTF-8 without BOM in Notepad++ did the job. Thank you. :)


I just provided the "stupid" solution, thanks for making me understand it now, thanks too!
User avatar
By ozayturay
#7865
gerardwr wrote:I just provided the "stupid" solution, thanks for making me understand it now, thanks too!


Because of BOM i have a lot of troubles while programming in PHP in the past. You can think it as 3 invisible characters at the beginning of the file. That's because deleting worked for you.

http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
User avatar
By gerardwr
#7866
ozayturay wrote:Because of BOM i have a lot of troubles while programming in PHP in the past. You can think it as 3 invisible characters at the beginning of the file. That's because deleting worked for you.

http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8


The Wiki article explains the BOM and usage very well. just might remember it for the future ;-)
User avatar
By to1140
#8563 Sorry to ask an entry level question - do you have a step-by-step instruction somewhere on how to use lhttpd.lua? I copied the files in webserver.zip to esp8266, then running http://.../index.html in Windows and cannot get it to work -- wifi connection was correctly made. Thanks for anyone's help.