Escaping <? on php shorthand enabled server when using require

后端 未结 2 939
我在风中等你
我在风中等你 2021-01-21 14:08

I\'m trying to require() my template for rss feed in php. Unfortunately I need to have shorthand tags enabled on server I\'m working with.

I have to start m

相关标签:
2条回答
  • 2021-01-21 14:29

    For XML files, the <?xml version="1.0" encoding="UTF-8" ?> is optional (and actually the default like you write it), so you can just remove it and therefore could fix the problem for this case.

    0 讨论(0)
  • 2021-01-21 14:37

    You could <?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?>

    0 讨论(0)
提交回复
热议问题