小编Jim*_*mmy的帖子

使用PHP删除包含特定单词/短语的行

伙计们我有一个文本文件,我想删除一些包含特定单词的行

 <?php
// set source file name and path
$source = "problem.txt";

// read raw text as array
$raw = file($source) or die("Cannot read file");
Run Code Online (Sandbox Code Playgroud)

现在有一个数组,我想删除一些行,并希望使用它们等.

php text

5
推荐指数
1
解决办法
7857
查看次数

标签 统计

php ×1

text ×1