This example shows the use of spliti.
Here it splits the path of the server as it can be used further.
<?php
require_once 'Beispiel.php';
$seq = new Sequence();
$path = $_SERVER["PATH_INFO"];
echo "PATH: ".$path."<br/>";
echo "Request mode: ".$_SERVER["REQUEST_METHOD"]."<br/>";
$daten = spliti ("/", $path);
echo "get-daten[1] ".$daten[1]."<br/>";
if($_SERVER["REQUEST_METHOD"]== "POST"){
echo "POST".$daten[1];
$seq->setzeSequence($daten[1], $_POST["xml"]);
}
elseif($_SERVER["REQUEST_METHOD"] == "DELETE"){
echo "DELETE".$daten[1];
$seq->loescheSequence($daten[1]);
}
elseif($_SERVER["REQUEST_METHOD"] == "GET"){
$antwort = $seq->holeSequence($daten[1]);
echo "antwort[0]: ".$antwort[0]."<br/>";
foreach($antwort as $mes){
echo "mes ".$mes."<br/>";
}
}
?>