Hi all,
I have an exercice in class, which is to write an bash file like this :
and run it on a browser.
But, instead of display date, it download the script. My teacher said that I must re-configuration httpd.conf (I'm not sure about this).
So would you please help me to make my script run on browser ? Thanks alot
I have an exercice in class, which is to write an bash file like this :
PHP:
#!/bin/sh
cat <<EOF
Content-Type: text/html; charset=utf-8
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Page HTML dynamique indiquant la date</title>
</head>
<body>
Voici la date d'aujourd'hui :
<br />
EOF
date
echo '</body></html>'
# Envoyer "<br />" permet d'afficher la date en dessous de la ligne
# "Voici la date d'aujourd'hui".
# Mettre une ligne vide dans le texte HTML
# ne provoquerait pas l'affichage en deux lignes par le navigateur,
# car il identifie espace et saut de ligne.
and run it on a browser.
But, instead of display date, it download the script. My teacher said that I must re-configuration httpd.conf (I'm not sure about this).
So would you please help me to make my script run on browser ? Thanks alot