« Apache/CGI » : différence entre les versions

Contenu supprimé Contenu ajouté
DannyS712 (discussion | contributions)
m <source> -> <syntaxhighlight> (phab:T237267)
 
Ligne 59 :
=== Bash ===
Voici un exemple de programme CGI écrit en bash :
<sourcesyntaxhighlight lang="bash">
#!/bin/bash
 
Ligne 70 :
# Contenu à afficher dans le navigateur
echo "<html><body>Hello World!</body></html>"
</syntaxhighlight>
</source>
 
Ce script génère une page HTML.
 
=== Perl ===
<sourcesyntaxhighlight lang="perl">
#!c:/perl/perl/bin/perl.exe -w
use CGI;
Ligne 82 :
print $query->header();
print "Hello World!"
</syntaxhighlight>
</source>
 
=== Python ===
<sourcesyntaxhighlight lang="python">
#!C:\Program Files (x86)\Python\python.exe
# -*- coding: UTF-8 -*-
Ligne 91 :
print
print "Hello World!"
</syntaxhighlight>
</source>
{{article détaillé|Programmation Python/L'interface CGI}}
 
=== VBS ===
Pour Windows<ref>http://wiki.uniformserver.com/index.php/CGI:_VBScript_CGI</ref>.
<sourcesyntaxhighlight lang="vb">
'!c:/windows/system32/cscript //nologo
Wscript.Echo "Content-type: text/html" & vbLF & vbLF
WScript.Echo "Hello World!"
Wscript.Quit 0
</syntaxhighlight>
</source>
 
== Références ==