[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PHP vs Perl
Nathan is absoloutely correct.
You can write about "anything" to be *.CGI script, as long as
it has executable permissions, and the extension ".cgi" (assuming Apache is
configured to recognize .cgi as "CGI" scripts)
We used to do this with Perl :
#!/usr/gnu/bin/perl
print "Content-type: text/html\n\n";
plain ole UNIX Shell scripting language :
#!/usr/bin/ksh
ulimit -c 1
print "Content-type: text/html\n\n";
and even compiled C programms,
You just have to make sure in the main C program, you put in
the Content type line somewhere after main( ) :
main(int argc, char *argv[]) {
FILE *file_fp;
char buf[BUFSIZ];
int dow;
int compare;
int all_days_change=0; /* flag */
long record_start;
long record_next;
int strlen_arg1=0;
char *my_char;
int changed=0;
printf("Content-type: text/html\n\n");
It will work. Doing it this way, you are responsible for
all of the output HTML tagsto the browser though. If you make an HTML
syntax error, your CGI might display un-expected output or
none at all. Just print the basic tags, you'll be okay.
Roger Hill
----- Original Message -----
From: "Nathaniel Reindl" <fiction@sdf.lonestar.org>
To: <silug-discuss@silug.org>
Sent: Thursday, August 05, 2004 9:34 AM
Subject: Re: PHP vs Perl
> On Thu, Aug 05, 2004 at 09:03:54AM -0500, Ken Keefe wrote:
> > I already am somewhat proficient in LISP and I'd like to use nothing
> > but, for that matter. However, I have yet to see how I can write LISP
> > code for the web, GUI, or any other commercial application.
>
> Okay. For this, I must call you insane; you want to do this. Now, I
> must call myself insane, for I've actually been stupid enough to do
> this. :)
>
> Anyway, go ahead and install some Common Lisp implementation. SBCL is
> fair game, and CMUCL also happens to fall into that category. Now, go
> ahead and put a shebang directive as the first line in your programs
> and make them match whatever scheme you have set up for your server to
> accept them as CGI scripts. This *should* work.
>
> http://www.cliki.net/ has some neat stuff for HTML templating and
> database connectivity and whatever else. GUI stuff too.
>
> --
> Nathaniel Reindl
>
> "Die Grenzen meiner Sprache bedeuten die Grenzen meiner Welt."
> (The limits of my language mean the limits of my world.)
> -- Ludwig Wittgenstein
>
> -
> To unsubscribe, send email to majordomo@silug.org with
> "unsubscribe silug-discuss" in the body.
>
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.