码迷,mamicode.com
首页 > Web开发 > 详细

PHP实现批量替换字典后缀

时间:2017-06-13 00:13:30      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:技术分享   txt   src   code   pre   hand   替换   and   die   

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

技术分享技术分享

PHP实现批量替换字典后缀

标签:技术分享   txt   src   code   pre   hand   替换   and   die   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!