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

前端 未结 8 764
囚心锁ツ
囚心锁ツ 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:25

    Here, try this (assuming it's a small file!):

    
    

    Documentation is here.

提交回复
热议问题