Elisp中的CGI编程? [英] CGI Programming in Elisp?
本文介绍了Elisp中的CGI编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#!/ 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 >
)
解决方案
<一个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屋!
查看全文