PHP cannot display the PHPcode & lt ;? Phpheader (Content-Type: textxml); echo & lt ;? Xmlversion & quot; 1.0 & quot; encoding & quot; UTF-8 & quot; standalone & quot; yes & quot ;? & Gt; PHP cannot display XML pages
PHP code
'; echo '
'; $name = $_POST['name']; echo 'hello '.htmlentities($name); echo '
'; ?>
Error. The prompt is as follows.
The XML page cannot be displayed.
XML input cannot be viewed using the XSL style sheet. Correct the error and click refresh or try again later.
--------------------------------------------
DOCTYPE cannot be declared outside Prolog. An error occurred while processing the resource 'http: // 127.0.0.1: 8088/test. php. Row 2nd, location: 11
------ Solution --------------------
You only have 8 or 9 lines of code. the error message is 11th lines.
PHP code
// Is there HTML? Output?
------ Solution --------------------
XML and HTML cannot be output at the same time!
......
Echo'';
Exit;
?>