lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Tomas,

Tomas wrote:

	Why don't you write a Lua script with the core module?
This script could execute another Lua script (as you already done)
and could also execute Lua pages, by calling cgilua.preprocess or
cgilua.includehtml (if the header must be different than text/html).

It's because it seems awkward for me to have to write three files to handle this situation: a driver, a page with the presentation and the library. I've thought that a page with the presentation stuff and a library with the code would suffice.

	As you said, "then comes some static content", this static
content is to be shown.  If you you want this content to be optional,
it should lay in another file (or in a function), loaded (or called)
if the script decides to do so.
	I think PHP is not like that, but I am not sure.  This
is our way of doing things :-)  I don't know if I am been clear;
I can send you an example if you prefer.

Maybe I'll just have to get used to the CGILua way, but I can't say I think it's better than the PHP way. Anyway thanks for your comments and helping with CGILua.