merge upstream phpxmlrpc
[plcapi.git] / php / phpxmlrpc / demo / server / discuss.php
index ac65209..ca5dd7d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-include_once __DIR__ . "/../../vendor/autoload.php";
+require_once __DIR__ . "/_prepend.php";
 
 use PhpXmlRpc\Value;
 
@@ -85,6 +85,9 @@ function getComments($req)
     }
 }
 
+// NB: take care not to output anything else after this call, as it will mess up the responses and it will be hard to
+// debug. In case you have to do so, at least re-emit a correct Content-Length http header (requires output buffering)
+
 $srv = new PhpXmlRpc\Server(array(
     "discuss.addComment" => array(
         "function" => "addComment",
@@ -97,3 +100,5 @@ $srv = new PhpXmlRpc\Server(array(
         "docstring" => $getComments_doc,
     ),
 ));
+
+require_once __DIR__ . "/_append.php";