file_get_contents not extracting full file contents

后端 未结 1 1861
长情又很酷
长情又很酷 2021-01-24 00:03

I m using the php function file_get_contents to parse a php file. But it seems that as soon as it is reading the php tags the file_get_contents is malfunctioning.

I che

相关标签:
1条回答
  • 2021-01-24 00:44

    Is the file local? Or are you trying to get a remote file? How did you check that the content is not read? Echoing it to a browser might trick you because of the < char in <?php

    Use htmlspecialchars or <pre> to view the whole text. Or just look at the source of the page.

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