【知识学习】PHP实现批量替换字典后缀

<?php
//要打开字典的物理路径
$filename = 'E:Local TestWWWpassword.txt';
$handle = fopen($filename,'r') or die('文件打开失败');
//读取字典
$contents = fread($handle,filesize('E:Local TestWWWpassword.txt'));
fclose($handle);
$text = explode('
',$contents);
foreach($text as $key=>$value){
    //修改要生成的邮箱后缀
    $text[$key] = $value.'@qq.com<br>';
    print_r($text[$key]);
}
?>

原文地址:https://www.cnblogs.com/sqyysec/p/6995267.html