Copy link to clipboard
Copied
Hi,
I have built XML manually from a recordset as instructed in David Powers book The Essential Guide to Dreamweaver CS3, page 703.
I have also used phpmyadmin to generate XML, page 696. I have attached both pages to this message.
When I tested wedding_manual.php in the browser, it wouldn't display, I just got a white screen. I have checked my php error logs, I get the message displayed below:
PHP parse error: syntax error, unexpected T_STRING in Applications/MAMP/htdocs/mywesite/mywebpage.php on line 43.
I have checked the code on line 43, it's where the XML declaration sits, I can't see anything wrong with the syntax. I deleted it a typed it in again, but there still seems to be a problem. I have also checked my code against japan_manual.php in examples/ch20, and again I cannot see where the problem is, could somebody please help me with this.
Thankyou.
Copy link to clipboard
Copied
If your server has short tags enabled in PHP, then it's recognizing the <?----?> in your XML declaration as PHP opening/closing tags, and of course running into a syntax error since what it's finding isn't PHP. The easiest way around that is usually to wrap the XML declaration inside PHP print or echo statements, so it's not processed as PHP. For instance, convert this:
<?xml version="1.0" encoding="utf-8"?>
...to something like:
<?php print('<?xml version="1.0" encoding="utf-8"?>'); ?>
(if the forum renders that OK...)
Copy link to clipboard
Copied
http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html