Elisp中的CGI编程? [英] CGI Programming in Elisp?

查看:96
本文介绍了Elisp中的CGI编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人为elisp编写任何库来进行CGI编程?我把一个快速的第一个脚本。但是,我只是一个很长时间的emacs用户,我从来没有真正编程。当我看到我可以在emacs中编写脚本(-script)而不是bash时,我以为我会给它一个镜头。

 
#!/ usr / bin / emacs --script

(princContent-type:text / html; charset = utf-8\\\
\\\


(progn(princ< html> \\\

(princ< body> \\\

(princ< h1 style ='text-align:center '> Elisp CGI Programming< / h1>))

(progn(princ< table style ='border:1px solid'>)
(princ< tr> < th>< / th>< / tr>)
(princ< tr> A< / th>< ; / th>< / tr>)
(princ< / table>)
(princ< / body>)
(princ< / html >


解决方案

这可能会帮助你,一个简单的cgi库为emacs



<一个href =http://www.emacswiki.org/emacs/cgi.el = nofollow noreferrer> http://www.emacswiki.org/emacs/cgi.el


Has anyone written any libraries for elisp to do CGI programming? I threw together a quick first script. However, I'm only a long-time emacs user and I've never really programmed it. When I saw that I could write scripts (--script) in emacs instead of bash, I thought that I would give it a shot.

#!/usr/bin/emacs --script

(princ "Content-type: text/html; charset=utf-8\n\n")

(progn (princ "<html>\n")
       (princ "<body>\n")
       (princ "<h1 style='text-align: center'>Elisp CGI Programming</h1>"))

(progn (princ "<table style='border:1px solid'>")
       (princ "<tr><th>One</th><th>Two</th></tr>")
       (princ "<tr><th>A</th><th>B</th></tr>")
       (princ "</table>")
       (princ "</body>")
       (princ "</html>")
)

解决方案

This might help you out, a simple cgi library for emacs

http://www.emacswiki.org/emacs/cgi.el

这篇关于Elisp中的CGI编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆