Jump to content

Is error:"XML Parsing Error: no element found" have something to do in php.ini?


plusnplus

Recommended Posts

Hi..,

I have code:

<?php
header("content-type: text/xml");
$xmlData = file_get_contents("http://www.google.com/ig/api?weather=new%20york");
echo $xmlData;
?>

and get error:XML Parsing Error: no element found.

 

is this kind of error need some setting in php.ini?

or what i should look at phpinfo() to make sure the setting is ok.

or.. is there any setting in apache?

i'm using win XP, apache, php and mysql.

 

if i type direct in browser: http://www.google.com/ig/api?weather=new%20york

it give me the xml file withour any error.

 

thanks for any reply/ help

In general you should, because 4.x versions are no longer supported.

In particular, this should not be the cause of this error.

 

What does var_dump($xmlData); show?

Do you have error_reporting enabled?

 

 

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.