Page 1 of 1

xml parsing error: syntax error

Posted: Thu Nov 14, 2013 4:46 pm
by rrlangly
I'm new w/ php and have the following file in the directory root of apache and php installed. I trying to learn REST and do a POST. So I'm beginning w/ a simple file, but its causing me errors already.

my file ...

Code: Select all

<?php
header("Content-Type: text/xml");

$method = $_SERVER['REQUEST_METHOD'];
$uri = $_SERVER['REQUEST_URI'];

print "method = $method\n";
print "uri = $uri\n";

?>
my error ...
[text]
XML Parsing Error: syntax error
Location: http://192.168.100.23/tests/tst.php
Line Number 1, Column 1:

method = GET
^
[/text]

Any idea whats going on?

Re: xml parsing error: syntax error

Posted: Thu Nov 14, 2013 11:00 pm
by requinix
That's not valid XML you're outputting there. Not by a long shot.