Jump to content

Why doesn't this super basic XML code work on my server?


jonblockx

Recommended Posts

=====

$contents = '<?xml version="1.0"?>

<rss>

<link>http://www.example.com/test?a=&b=&</link>

</rss>

';   

$parser = xml_parser_create('');

xml_parse_into_struct($parser, trim($contents), $xml_values);

print_r($xml_values[1]['value']);

=====

Locally on my Mac MAMP (PHP Version 5.2.6) I get:

 

http://www.example.com/test?a=&b=&

 

However, in my Fedora (PHP Version 5.2.6) production server, I get:

 

http://www.example.com/test?a=b=

 

Where are my ampersands??? How do I make them appear on my Fedora server?

 

Help!

Thank you,

Jon

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.