PHP: How do I display the contents of a textfile on my page?

前端 未结 8 775
囚心锁ツ
囚心锁ツ 2020-12-16 09:37

I have a .txt file on my web server (locally) and wish to display the contents within a page (stored on the same server) via PHP echo.

The .txt file contains a numbe

8条回答
  •  佛祖请我去吃肉
    2020-12-16 10:16

    If you aren't looking to do anything to the stuff in the file, just display it, you can actually just include() it. include works for any file type, but of course it runs any php code it finds inside.

提交回复
热议问题