cgi does not do "save stack"
Monte Goulding
monte at sweattechnologies.com
Wed Sep 10 17:07:01 EDT 2003
>
> > I am able to do all kind of nifty things in my cgi tests, but I am
> > unable to save a stack, no matter how I try it. Is there a bug, or must
> > I just save differently then in the normal environment? Maybe it's
> > because I use the metacard engine?
> >
> > cgi script below:
> > #!mc
> > on startup
> > open stack "guestbook"
> > read from stdin until empty
> > if it <> empty then
> > put urldecode(it) into data
> > split data by "&" and "="
> > go to last card
> > create card
> > put the short internet date into field "date"
> > put data["name"] into field "name"
> > put data["text"] into field "entry"
> > replace return with "<br>" in field "entry"
> > end if
> > put "Content-Type: text/html" & crlf & crlf
> > put "<html><head><title>You are on my iBook! @
> > bvg.kicks-ass.org</title></head><body bgcolor=" & quote & "148D00" &
> > quote & ">"
> > repeat with x = the number of cards down to 1
> > go to card x
> > put "<p>date:<br>" & field "date"
> > put "<br>name:<br>" & field "name"
> > put "<br>text:<br>" & field "entry" & "</p><hr>"
> > end repeat
> > put "</body>"
> > save stack "guestbook" --does not work!!
> > close stack "guestbook"
> > end startup
> >
>
> Hi Björnke,
>
> I think that it's no way to save a stack without opening it, directly,
> in graphical mode.
>
Not quite true. You can save a stack but you have to ensure that it's got the correct write permissions. You probably want it set to 775 or something.
Cheers
Monte
More information about the use-livecode
mailing list