See the full code in the XLua\Tutorial\LoadLuaScript\ByFile directory. The require actually calls the loaders one by one to load the file. The loading process stops if one loader succeeds. If all ...
The most basic way to execute a string is to use LuaEnv.DoString. The string must be compliant with Lua syntax.