Wenn-Abfragen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($mode == '1') | |
{ | |
/* Codeblock */ ; | |
} | |
elseif ($mode == '2') | |
{ | |
/* Codeblock */ ; | |
} | |
else | |
{ | |
/* Codeblock */ ; | |
} | |
// Kurzform | |
if ($mode == '1'){} else {} | |
// Kurzform | |
if ($mode == '1'){} | |
else if ($mode == '2'){} | |
else {} | |
//Auf Vorhandensein prüfen | |
// Prüft ob die Variable existiert, erzeugt sie ggf. mit einem beliebigen Wert | |
if(isset($_GET['modus'])){ | |
$modus = $_GET['modus']; | |
}else{ | |
$modus = "new"; | |
} | |
// Prüft ob die Datei vorhanden ist. Unbedingt nötig, wenn Dateinamen un der URL definiert werden | |
$page = "seite.php"; | |
if (is_readable(dirname(__FILE__) . '/' . $page)) { | |
include("$page"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment