Windows php error on first line with <? -


i have php script starts following line

<?xml version="1.0" encoding="utf-8"?> 

it works fine in lamp world when port windows think thinks line code when it's not error in visual studio:

syntax error: unexpected token 'version'

is there way can windows php not consider code? thought code blocks had start <?php?

you can use header function of php render tag you. put @ first line of code:

<? header("content-type: text/xml; charset=utf-8") ?>  

then won't have problems opening php tag.


Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -