SimonHowald
asked on
PHP Parse error: parse error, unexpected T_STRING in
PHP Parse error: parse error, unexpected T_STRING in abc.php on line 2:
I'm getting this on Linux environment but the same script works on Windows box.
Anything wrong?
the contents of the abc.php is as follows:
I'm getting this on Linux environment but the same script works on Windows box.
Anything wrong?
the contents of the abc.php is as follows:
<?php header('Content-type: text/xml'); ?>
<?xml version="1.0" encoding="utf-8" ?>
<categories>
<?php
include 'config.php';
$con = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
..
..
..
?>
</categories>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
you are PHP Genius!
The XML headers use "<?" and "?>" ...just like PHP ;)
PHP didn't know how to handle "xml version..." so you had to echo it.
Hope that helps!
PHP didn't know how to handle "xml version..." so you had to echo it.
Hope that helps!
ASKER
thanks!
ASKER
why do we need to do this?