首页 > 作文

简单去除文本重复

更新时间:2023-04-07 05:46:54 阅读: 评论:0

<?php

error_reporting(0);

echo”\n”.”输入要整理的文件:”.”\n”;

$dic=trim(fgets(stdin));

$file=file($dic);

$a快乐中秋节作文500rray=preg_replace(‘/($\s*$)|(^\s*党的性质宗旨^)/m’,”,$file); //消除空行

$new_array=array_values(array_unique($array));//消除重复行

$new_filename=”new_”. baname($dic); www.2cto.com

if(file_put_contents(“$new_filename”,join(“\r\n”,$new_array))){

echo”——————————————“.”\r\n”;

echo”\n”.”去除重复完毕!”.”\r\n” ;

echo”去除重复后的文件为:”.”\r\n”;

echo dirname(__file__).directory_parator.”$new_filename”.”\r\n”;

echo̶放风筝用英语怎么说1;——————————————“.”\r\n”;

}

el{

echo”——————————————“.”\r\n”;

22公里是多少米

echo”错误!”.”\r\n”;

echo”找不到文件!请检查输入路径是否存在!”.”\r\n”;

echo”——————什么是专科;————————“.”\r\n”;

exit();

}

?>

摘自 https://hi.baidu.com/nginxshel

本文发布于:2023-04-07 05:46:52,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/25ebedf2ce3d32e47e03847db4c72927.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:简单去除文本重复.doc

本文 PDF 下载地址:简单去除文本重复.pdf

下一篇:返回列表
标签:文件   空行   找不到   放风筝
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图