In php, how do I load txt file as a string?

后端 未结 4 1543
被撕碎了的回忆
被撕碎了的回忆 2021-01-02 19:01

I have a text file that contains paragraphs of text. I want to load it as a string in php, and then collect all the e-mail addresses within it as an array. However, how do

4条回答
  •  渐次进展
    2021-01-02 19:23

    The simplest way is file-get-contents!

    $file_content = file_get_contents('/path/to/file');
    

提交回复
热议问题