It's trying to run it as a shell script, which interprets your <?php
token as bash, which is a syntax error. Just use include()
or one of its friends:
For example, in a.php
put:
<?php
print "one";
include 'b.php';
print "three";
?>
In b.php
put:
<?php
print "two";
?>
Prints:
eric@dev ~ $ php a.php
onetwothree