Kod: Označi sve
#! /usr/bin/clisp
;;; -*- Mode: Lisp -*-
;;;
;;; $Header: /home/gene/library/website/docsrc/lc/RCS/show-env.lisp,v 395.1 2008/04/20 17:25:45 gene Exp $
;;;
;;; Make an HTML table of the CGI environment variables.
;;;
(format t "Content-type: text/html~%")
(format t "~%")
(format t "<html>~%<head>~%")
(format t "<title>CGI environment variables</title>~%")
(format t "</head>~%<body~%><table border=\"1\">~%")
(mapc #'(lambda (env)
(format t "<tr><td>~A</td> <td>~A</td></tr>~%"
env (or (system::getenv env) "")))
'("AUTH_TYPE"
"CONTENT_LENGTH"
"CONTENT_TYPE"
"GATEWAY_INTERFACE"
"PATH_INFO"
"PATH_TRANSLATED"
"QUERY_STRING"
"REMOTE_ADDR"
"REMOTE_HOST"
"REMOTE_IDENT"
"REMOTE_USER"
"REQUEST_METHOD"
"SCRIPT_NAME"
"SERVER_NAME"
"SERVER_PORT"
"SERVER_PROTOCOL"
"SERVER_SOFTWARE"))
(format t "</table>~%</body>~%</html>~%")
;;; --- end of file ---
Kod: Označi sve
chmod a+x /var/www/cgi-bin/show-env.cgihttp://localhost/cgi-bin/show-env.cgi
se nalazi vas lisp program