Change <? to <?php and add some formatting

This commit is contained in:
Shikiryu committed 2016-11-17 22:16:26 +01:00
1 parent 2d5ba7fb8d
commit fb71f8c112
27 files changed
+270 -296

No files matched your search

+1 -21
View File
@@ -1,21 +1 @@
<?␍
$xmla = simplexml_load_file('../db/todoist.xml');␍
if(isset($_POST['token'])){␍
$token = trim($_POST['token']);␍
␍
$xmla->addChild("token", $token);␍
␍
$xmla->asXML('../db/todoist.xml');␍
␍
echo "ok";␍
}else if(isset($_POST['name']) && isset($_POST['id'])){␍
$name = trim($_POST['name']);␍
$id = trim($_POST['id']);␍
␍
$xmla->addChild("name", $name);␍
$xmla->addChild("id", $id);␍
␍
$xmla->asXML('../db/todoist.xml');␍
␍
echo "ok";␍
}
<?php␍␍$xmla = simplexml_load_file('../db/todoist.xml');␍␍if (isset($_POST['token'])) {␍␍ $token = trim($_POST['token']);␍ $xmla->addChild("token", $token);␍ $xmla->asXML('../db/todoist.xml');␍ echo "ok";␍␍} else if (isset($_POST['name']) && isset($_POST['id'])) {␍␍ $name = trim($_POST['name']);␍ $id = trim($_POST['id']);␍ $xmla->addChild("name", $name);␍ $xmla->addChild("id", $id);␍ $xmla->asXML('../db/todoist.xml');␍␍ echo "ok";␍␍}