TOP
SSV Software Systems Register  Register
Log in to check your private messages  Log in to check your private messages
Startseite FAQ Search Mitglieder Profile  Log in 
SSV Support-Forum
CGI und der Webserver eines ADNP/9200 ...

 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> ADNP/9200
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 25.01.2007, 09:06    Post subject: CGI und der Webserver eines ADNP/9200 ... Reply with quote

Der thttpd Webserver (Bestandteil der Linux-Konfiguration eines ADNP/9200) ist für CGI vorbereitet. Um CGI zu testen, einfach das folgende Shell Script im Verzeichnis /flash/www/cgi-bin als Datei mit dem Namen „test.sh“ ablegen (falls /flash/www/cgi-bin nicht vorhanden ist, bitte dieses Verzeichnis zunächst erzeugen):

#!/bin/sh
# test.sh
# Environment Variable
echo Content-type: text/html
echo
echo "<html>"
echo "<head>"
echo "<title>"
echo "CGI Environment Variable"
echo "</title>"
echo "</head>"
echo "<body>"
echo "SERVER_SOFTWARE=$SERVER_SOFTWARE<br/>"
echo "SERVER_NAME=$SERVER_NAME<br/>"
echo "SERVER_PROTOCOL=$SERVER_PROTOCOL<br/>"
echo "SERVER_PORT=$SERVER_PORT<br/>"
echo "REQUEST_METHOD=$REQUEST_METHOD<br/>"
echo "GATEWAY_INTERFACE=$GATEWAY_INTERFACE<br/>"
echo "PATH_INFO=$PATH_INFO<br/>"
echo "PATH_TRANSLATED=$PATH_TRANSLATED<br/>"
echo "REMOTE_HOST=$REMOTE_HOST<br/>"
echo "REMOTE_ADDR=$REMOTE_ADDR<br/>"
echo "REMOTE_IDENT=$REMOTE_IDENT<br/>"
echo "SCRIPT_NAME=$SCRIPT_NAME<br/>"
echo "QUERY_STRING=$QUERY_STRING<br/>"
echo "CONTENT_TYPE=$CONTENT_TYPE<br/>"
echo "CONTENT_LENGTH=$CONTENT_LENGTH<br/>"
echo "</body>"
echo "</html>"
exit 0


Die Datei mit dem Script Code muss mit “Read = +r” und “Executable = +x” Attributen ausgestattet werden. Danach kann sie per Webbrowser über die entsprechende URL ausgeführt werden. Die URL wäre

http://192.168.0.126/cgi-bin/test.sh

Dabei ist 192.168.0.126 die IP-Adresse des ADNP/9200.

Gruß

KDW
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> ADNP/9200 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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

SSV Software Systems GmbH

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2023 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015