「🔀」 merge: a very cool feature has been merged ! :D

This commit is contained in:
KeyZox committed 2025-07-15 20:28:48 +02:00
1 parent 9ce4eb8306
commit b9a0714925
9 files changed
+120 -32

No files matched your search

+25 -14
View File
@@ -1,7 +1,9 @@
#!/nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/bin/python3
# Import modules for CGI handling
#!/usr/bin/env python3
import cgi
import cgitb
import time
import os
import sys # Needed for sys.exit()
# Enable error reporting
cgitb.enable()
@@ -9,16 +11,25 @@ cgitb.enable()
# Create instance of FieldStorage
form = cgi.FieldStorage()
# Set the content type to HTML
print("Content-Type: text/html\n")
try:
# Set the content type to HTML
print("Content-Type: text/html\n")
# Output a simple HTML page
print("<html>")
print("<head>")
print("<title>CGI Script Test</title>")
print("</head>")
print("<body>")
print("<h1>CGI Script is Running</h1>")
print("<p>Your web server is working correctly!</p>")
print("</body>")
print("</html>")
# Output a simple HTML page
print("<html>")
print("<head>")
print("<title>CGI Script Test</title>")
print("</head>")
print("<body>")
print("<h1>CGI Script is Running</h1>")
print("<p>Your web server is working correctly!</p>")
files = os.listdir('.')
for file in files:
print(file)
print("</body>")
print("</html>")
except Exception:
# Print error page and exit with error code
cgitb.handler()
sys.exit(1)