How to create include files in Lua language?

require "header"

See the require entry in the Lua Reference manual. The file “header.lua” must be somewhere in Lua’s search path.

You can see (and modify) the path at

package.path

See the package.path entry in the the Lua Reference Manual

This wiki page describes ways of creating modules to load with require.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)