|
|
| Author |
Message |
|
| hknight |
Posted: Tue Feb 23, 2010 1:29 pm |
|
|
|
User
Joined: 07 Jan 2010
Posts: 11
|
The following Yaws code returns results to the web. Instead, I want
it to output the results to a text file named "output.txt"
<erl>
out(A) ->
Hdrs = A#arg.headers,
Other = Hdrs#headers.other,
{ehtml,
[
{item, [],
["Host: ",
{span, [], Hdrs#headers.host}]},
{item, [],
["IP Address: ",
{span, [], f("~p", [inet:peername(A#arg.clisock)])}]},
{item, [],
["Your user agent is: ",
{span, [], Hdrs#headers.user_agent}]},
{item, [],
["Accept-Charset: ",
{span, [],
f("~p", [yaws_api:parse_query(A)]) }]}
]}.
</erl>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Feb 23, 2010 3:32 pm |
|
|
|
Guest
|
On Tue, Feb 23, 2010 at 7:57 AM, Hank Knight <hknight555@gmail.com (hknight555@gmail.com)> wrote:
Quote: The following Yaws code returns results to the web. |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|