erlangweb

Erlang read post request

江枫思渺然 提交于 2019-12-08 03:40:36
问题 I'm trying to build a simple web server based on Erlang, so far I'm able to start a server with below code. tutorial ref -module(helloworld). -export([ main/1, run_server/0, start/0, service/3, ]). main(_) -> start(), receive stop -> ok end. run_server() -> ok = inets:start(), {ok, _} = inets:start(httpd, [ {modules, [ mod_alias, mod_auth, mod_esi, mod_actions, mod_cgi, mod_dir, mod_get, mod_head, mod_log, mod_disk_log ]}, {port, 8000}, {server_name,"helloworld"}, {server_root,"/tmp"},

Erlang: Output Problem

浪尽此生 提交于 2019-12-07 22:58:10
问题 In my erlang web application, there is a list, which contains integers to be printed on the web page. But when the script executes, it prints this, instead of actual list, Please look at this Image showing characters for unicode codepoint 1, 1, 2, 3, 5, 8, whitespace, codepoint 15 How to format this to gain what I want? Target list is [1, 1, 2, 3, 5, 8, 13, 15] 回答1: You should do this: P = [1, 1, 2, 3, 5, 8, 13, 15], Show_on_page = io_lib:format("~p",[P]), Show_on_page. This will represent

Erlang: Output Problem

三世轮回 提交于 2019-12-06 14:34:29
In my erlang web application, there is a list, which contains integers to be printed on the web page. But when the script executes, it prints this, instead of actual list, Please look at this Image showing characters for unicode codepoint 1, 1, 2, 3, 5, 8, whitespace, codepoint 15 How to format this to gain what I want? Target list is [1, 1, 2, 3, 5, 8, 13, 15] Muzaaya Joshua You should do this: P = [1, 1, 2, 3, 5, 8, 13, 15], Show_on_page = io_lib:format("~p",[P]), Show_on_page. This will represent any Erlang term on the web page the way you want to see it. You Web presentation probably like

A good OpenID implementation in Erlang?

穿精又带淫゛_ 提交于 2019-12-05 04:15:27
问题 I'm looking for a good (Or at least working) implementation of OpenID in erlang. I've looked at several different solutions, but non of them are working 100%. 回答1: Have your tried eopenid? http://github.com/etnt/eopenid You can contact Tobbe via his blog if you find some problems with it: http://www.redhoterlang.com/entry/be023e5181553216197369bbe32c4039 回答2: So far as I know, eopenid supports only OpenID 1.1. I have some code for doing OpenID 2.0, parts of which are based on eopenid, at http

A good OpenID implementation in Erlang?

本小妞迷上赌 提交于 2019-12-03 22:16:57
I'm looking for a good (Or at least working) implementation of OpenID in erlang. I've looked at several different solutions, but non of them are working 100%. Have your tried eopenid? http://github.com/etnt/eopenid You can contact Tobbe via his blog if you find some problems with it: http://www.redhoterlang.com/entry/be023e5181553216197369bbe32c4039 So far as I know, eopenid supports only OpenID 1.1. I have some code for doing OpenID 2.0, parts of which are based on eopenid, at http://github.com/brendonh/erl_openid (and a quick tutorial at http://taizilla.wordpress.com/2010/07/21/erl_openid/ )