Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: REBOL + PHP, or ...?

From: petr:krenzelok:trz:cz at: 25-Nov-2001 6:11

Christian Morency wrote:
>Hi, > >>Ah, thanks! So all my pages are supposed to come to /cgi-bin/ dir, >>right? Few comments, one question though :-) >> > >Actually no, they can be anywhere in the hierarchy of your site, however >since they have a specific extension you told Apache about, they will be >processed by rebol.exe. Yeah, you put erebol.r in the cgi-bin directory, but >I'm not even sure that this is obligatory... >
I am not sure I understand you correctly, but typically assigning some extension for your files to be "executed", we speak "cgi". I have currently set-up ability to execute scripts only for /cgi-bin/ dir, and /fast-cgi/ for fast-cgi scripts. I am not sure it is a good thing to allow cgi scripts being executed from anywhere on your server .... btw: here is a code snipped from old Apache rebol handler: output: make string! 1000 p2: head file until [ not all [ p1: find p2 "<!--[" append output copy/part p2 p1 p2: find p1 "]-->" either not error? set/any 'result try [ do load copy/part skip p1 4 next p2 ][ append output any compose [(get/any 'result) system/ports/output # ] clear system/ports/output ][apache/log reform ["SSI error:" newline mold disarm result] apache-codes/LOG-INFO true ] p2: skip p2 4 ;-thx petr ] ] print append output copy p2 As you can see, parser was not used for e.g. And also - <!--[code here]--!> looks more rebol way than <%code here%> :-)
>>1) I would strongly suggest to NOT prin(t) parts of script to output. >>That slow downs things way too much to be viable. Have you ever tried to >>store your text to buffer first, and print it at once at the end?\ >> > >Actually, you can even save the information to txt files and reuse them >later with a print read %file within your script. >
Hmm, of course you can, but why to slow it down by hd access? Cheers, -pekr-