Last active
January 5, 2018 03:17
-
-
Save radarin/68f2a5203b54771aef1a0834fc6aea7a to your computer and use it in GitHub Desktop.
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