Posted by NC on 09/22/06 18:24
Robertico wrote:
>
> I can't get i to work.
> When i saved it as php file, the php code isn't executed.
>
> <?xml version="1.0"?>
> <rss version="2.0">
> <channel>
> <title>MyTitle</title>
> <link>http://www.mydomain.com/</link>
> <description>MYDescription</description>
> <item>
> <title>YourIP</title>
> <link>http://www.mydomain.com/yourip.php</link>
> <description>Your current IP</description>
> <ipaddress><?php echo getenv ("REMOTE_ADDR");?></ipaddress>
> </item>
> </channel>
> </rss>
OK, let's make a checklist:
1. Does your server execute code in other PHP scipts?
2. Is this script saved with a *.php extension?
3. What exactly do you see in the output that makes
you think PHP code is not executed?
4. What happens if you replace
<?xml version="1.0"?>
with
<?php
header('Content-Type: text/xml');
echo '<?xml version="1.0"?>';
?>
Cheers,
NC
[Back to original message]
|