Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
不知道这叫什么,但有没有办法可以从文件中提取数据,回显它,但忽略特定字符集中的数据?
<?php echo file_get_contents('test.txt'); ?>
当我回显最终函数时,是否可以忽略星号之间的数据以及星号本身?
您不会像“一无所有”那样“忽略它”
一个快速的“n”脏方法
echo preg_replace( "/\*{3}.*?\*{3}/", "", file_get_contents( 'test.txt' ) );