Forum Discussion
Altera_Forum
Honored Contributor
21 years agoCGI
hi,
i 've read that the httpserver within Ecos supports CGI. How to use CGI in httpserver? In other webserver with CGI support the executeable cgi file has to be located in a directory like cyg-bin. How about the one within ecos? Thnx4 Replies
- Altera_Forum
Honored Contributor
Documentation on how to use the eCos web server can be found in eCos reference manual. This is installed along with the rest of eCos. Alternatively, you can find a copy here (http://ecos.sourceware.org/docs-latest/ref/net-httpd-chapter.html).
The section "Server Organisation" explains how to associate a function with a filename within the server. Subsequent sections explain how you can generate HTML content. This is not strictly CGI, but it achieves the same thing. - Altera_Forum
Honored Contributor
Thnx monkeyboy
- Altera_Forum
Honored Contributor
hi monkeyboy,
i've tried to read some enviroment variables. The function i used is: char *content; content = getenv(CONTENT_TYPE); content = getenv(REMOTE_HOST); ... it seems that i cannot read the enviroment variables. Does the webserver within ecos support full CGI scripting? Thnx - Altera_Forum
Honored Contributor
From your other posts, I guess you've already worked this out, but the eCos web server does not support CGI. However it does support dynamic content generation.