Voll Upload SGD Fachinformatiker PHP

This commit is contained in:
2026-06-03 13:46:32 +00:00
parent 1256ec2190
commit 84a568d89c
265 changed files with 9961 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
if (isset($_GET['a']) && isset($_GET['b'])) {
$a = $_GET['a'];
$b = $_GET['b'];
echo "Versuch der Division zweier Zahlen.<br>" . "Werfen einer Ausnahme, " . "wenn Division durch 0 zu teilen.<hr> ";
try {
if ($b == 0)
throw new Exception("<hr>Keine Division durch 0 erlaubt<hr>");
echo $a / $b . "<br>";
} catch(Exception $e) {
print_r($e);
}
echo "<hr>Nach dem potenziellen Problem. ";
}
?>
<form >
Wert 1: <input name="a"><br>
Wert 2: <input name="b"><br>
<input type="submit">
</form>