替换请教 比如: 我爱雅婷 我珍惜小婷把雅婷替换成小婷小婷替换成雅婷希望得到的答案: 我爱小婷 我珍惜雅婷主要是替换的时候 容易造成 变成 我爱雅婷 我珍惜雅婷有什么好方法吗 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $content='我爱雅婷 我珍惜小婷';$content=str_replace('雅婷','王婷',$content); //王婷是中间临时存储替换,随意$content=str_replace('小婷','雅婷',$content);$content=str_replace('王婷','小婷',$content);echo $content; <?$content='今早起来用想用XT看看家里的电脑,谁知道打开后在查看“内核模块”的时候,在XT驱动和一个貌似虚拟光驱的驱动的“文件厂商”一栏处居然显示“文件不存在”,怎么回事??!!想请教个私服游戏的问题- 游戏交流- 卡饭--小白杀毒交流 ';include("wordsfb.php"); if($wordsfb) { foreach($wordsfb as $key=>$value){ $i++; $value="ky_".$i."s"; $content=str_replace($key,$value,$content); } } foreach($wordsfb as $key=>$value){ $p++; $key="ky_".$p."s"; $content=str_replace($key,$value,$content); } echo $content;?><?php$wordsfb['中国']='中华人民共和国';$wordsfb['问题']='疑问';$wordsfb['疑问']='问题';$wordsfb['怎么回事']='为什么';$wordsfb['为什么']='怎么回事';$wordsfb['知道']='明白';$wordsfb['明白']='知道';$wordsfb['发帖']='发表主题';$wordsfb['今早']='今天早上';$wordsfb['家里']='家中';$wordsfb['删除']='彻底删除';$wordsfb['以前']='早前';$wordsfb['一']='1';$wordsfb['二']='2';$wordsfb['三']='3';$wordsfb['四']='4';$wordsfb['楼主']='发帖人';$wordsfb['谢谢']='感谢';$wordsfb['感情']='谢谢';$wordsfb['版本']='软件版本';$wordsfb['软件版本']='版本';$wordsfb['国外']='外国';$wordsfb['外国']='国外';$wordsfb['最新']='目前最新';$wordsfb['杀毒软件']='安全工具';$wordsfb['软件']='绿色软件';$wordsfb['如何']='怎样';$wordsfb['怎样']='如何';$wordsfb['论坛']='交流区';$wordsfb['确实']='的确';$wordsfb['的确']='确实';$wordsfb['请问']='请教';$wordsfb['请教']='请问';<html><title>伪原创</title><meta http-equiv=Content-Type content="text/html; charset=gb2312"><style>body{font-family:宋体}img{border:0}td,p{font-size:12px}p{width:600px;margin:0;padding:0}.ff{font-family:Verdana;font-size:16px}#n{margin:0px auto;font-size:12px;padding:0px;border-bottom:1px solid #00c;BACKGROUND:#eee;width:600px;height:18px}#n li{float:left;display:block;margin:0px;padding:0px;width:87px}#n li a{display:block;text-decoration:none;padding:4px 0px 0px 0px;margin:0px;width:100%}#n li a:hover{text-decoration:underline;background:#FFF;padding:4px 0px 0px 0px;margin:0px}#n li#h{width:56px;height:18px}#n li#m{width:85px;height:18px}#n .w{background:#00C;color:#FFF;padding:4px 0px 0px 0px;margin:0px;font-weight:bold}#b {width:600px;height:30px;padding-top:4px;color:#77c;font-size:12px;font-family:Arial}#b a{color:#77c;font-size:12px}</style></head><body bgcolor=ffffff text=000000 link=0000cc vlink=0000cc alink=ff6600 ><center><br><br><br> <p> </p> <form name="form1" method="post" action="ky.php?do=save" ><table width="300" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="200"> <label><div>被替换:</div> <!--<input name="do" type="text" size="20" maxlength="200">--> <input name="Site" type="text" size="20" maxlength="200"> <div>替换成:</div> <input name="name" type="text" size="20" > </label> </td> <td width="100"><label> <input type="submit" name="Submit" value="提交"> </label></td> </tr> </table> </form> <p> </p> <? $do=$_REQUEST['do']; $Site=$_REQUEST['Site']; $name=$_REQUEST['name']; $Site=str_replace("http://",'',$Site); $Site=str_replace("/",'',$Site); if($do=="save" and $Site != "" and $name != ""){ //加入news.php列表$news='\$wordsfb\[\''.$Site.'\'\]=\''.$name.'\'\;';$news1='$wordsfb[\''.$Site.'\']=\''.$name.'\';';$del_file="wordsfb.php";$handle = @file_get_contents($del_file);if (@preg_match ("/$news/", $handle)) {echo "已经提交过<br>";} else {//echo $news;$fp3 = @fopen($del_file,"a");@flock($fp3,2);@fwrite($fp3,$news1);@fclose($fp3); echo "提交成功<br>";} } if($_REQUEST['do']=='del'){ $handle = @file_get_contents("wordsfb.php"); $data=$_REQUEST['data']; $data=str_replace("\'",'\'',$data); echo $data; $handle_1=str_replace($data,'',$handle); $del_file="wordsfb.php"; //echo $handle; //echo $data; $fp3 = @fopen($del_file,"w");@flock($fp3,2);@fwrite($fp3,$handle_1);@fclose($fp3);echo "删除成功<br>"; } echo "友情链接<br>"; $handle = @file_get_contents("wordsfb.php"); $handle=preg_replace('/\$wordsfb\[\'([^\["\']+?)\'\]=\'([^\["\']+?)\'\;/isUe',"'<br> \\1 替换成 \\2 <a href=\"ky.php?do=del&data=\$wordsfb[\\'\\1\\']=\\'\\2\\';\">删除</a>'",$handle); echo $handle; ?> </center> </body> </html> zend studio工具能不能提示thinkphp的代码 dede首页时间调用问题 如何加上排除组合出来的重复号码 如何实现这样的邮箱变量? "张三" <[email protected]> 请教旋转矩阵的计算公式或方法 session的问题,include别的页的问题 关于PHP技术问题,请高手解答!!!!!!!! 数据库的遍历 实现相关下载相关新闻之类的方法有哪些? phpbb2编码(在线,解决马上给分) 用header下载文件,数据没有下载完全?? 请问如何在PHP里嵌入HTML
$content=str_replace('雅婷','王婷',$content); //王婷是中间临时存储替换,随意
$content=str_replace('小婷','雅婷',$content);
$content=str_replace('王婷','小婷',$content);
echo $content;
<?
$content='今早起来用想用XT看看家里的电脑,谁知道打开后在查看“内核模块”的时候,在XT驱动和一个貌似虚拟光驱的驱动的“文件厂商”一栏处居然显示“文件不存在”,怎么回事??!!想请教个私服游戏的问题- 游戏交流- 卡饭--小白杀毒交流 ';
include("wordsfb.php"); if($wordsfb)
{
foreach($wordsfb as $key=>$value){
$i++;
$value="ky_".$i."s";
$content=str_replace($key,$value,$content);
}
}
foreach($wordsfb as $key=>$value){
$p++;
$key="ky_".$p."s";
$content=str_replace($key,$value,$content);
}
echo $content;
?><?php
$wordsfb['中国']='中华人民共和国';$wordsfb['问题']='疑问';$wordsfb['疑问']='问题';$wordsfb['怎么回事']='为什么';$wordsfb['为什么']='怎么回事';$wordsfb['知道']='明白';$wordsfb['明白']='知道';$wordsfb['发帖']='发表主题';$wordsfb['今早']='今天早上';$wordsfb['家里']='家中';$wordsfb['删除']='彻底删除';$wordsfb['以前']='早前';$wordsfb['一']='1';$wordsfb['二']='2';$wordsfb['三']='3';$wordsfb['四']='4';$wordsfb['楼主']='发帖人';$wordsfb['谢谢']='感谢';$wordsfb['感情']='谢谢';$wordsfb['版本']='软件版本';$wordsfb['软件版本']='版本';$wordsfb['国外']='外国';$wordsfb['外国']='国外';$wordsfb['最新']='目前最新';$wordsfb['杀毒软件']='安全工具';$wordsfb['软件']='绿色软件';$wordsfb['如何']='怎样';$wordsfb['怎样']='如何';$wordsfb['论坛']='交流区';$wordsfb['确实']='的确';$wordsfb['的确']='确实';$wordsfb['请问']='请教';$wordsfb['请教']='请问';<html>
<title>伪原创</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<style>body{font-family:宋体}img{border:0}td,p{font-size:12px}p{width:600px;margin:0;padding:0}.ff{font-family:Verdana;font-size:16px}
#n{margin:0px auto;font-size:12px;padding:0px;border-bottom:1px solid #00c;BACKGROUND:#eee;width:600px;height:18px}
#n li{float:left;display:block;margin:0px;padding:0px;width:87px}
#n li a{display:block;text-decoration:none;padding:4px 0px 0px 0px;margin:0px;width:100%}
#n li a:hover{text-decoration:underline;background:#FFF;padding:4px 0px 0px 0px;margin:0px}
#n li#h{width:56px;height:18px}#n li#m{width:85px;height:18px}
#n .w{background:#00C;color:#FFF;padding:4px 0px 0px 0px;margin:0px;font-weight:bold}
#b {width:600px;height:30px;padding-top:4px;color:#77c;font-size:12px;font-family:Arial}#b a{color:#77c;font-size:12px}</style></head>
<body bgcolor=ffffff text=000000 link=0000cc vlink=0000cc alink=ff6600 >
<center>
<br><br><br>
<p> </p>
<form name="form1" method="post" action="ky.php?do=save" ><table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200">
<label><div>被替换:</div>
<!--<input name="do" type="text" size="20" maxlength="200">-->
<input name="Site" type="text" size="20" maxlength="200">
<div>替换成:</div>
<input name="name" type="text" size="20" >
</label>
</td>
<td width="100"><label>
<input type="submit" name="Submit" value="提交">
</label></td>
</tr>
</table>
</form>
<p> </p>
<?
$do=$_REQUEST['do'];
$Site=$_REQUEST['Site'];
$name=$_REQUEST['name'];
$Site=str_replace("http://",'',$Site);
$Site=str_replace("/",'',$Site);
if($do=="save" and $Site != "" and $name != ""){ //加入news.php列表
$news='\$wordsfb\[\''.$Site.'\'\]=\''.$name.'\'\;';
$news1='$wordsfb[\''.$Site.'\']=\''.$name.'\';';
$del_file="wordsfb.php";
$handle = @file_get_contents($del_file);
if (@preg_match ("/$news/", $handle)) {
echo "已经提交过<br>";
} else {
//echo $news;
$fp3 = @fopen($del_file,"a");
@flock($fp3,2);
@fwrite($fp3,$news1);
@fclose($fp3);
echo "提交成功<br>";
}
}
if($_REQUEST['do']=='del'){
$handle = @file_get_contents("wordsfb.php");
$data=$_REQUEST['data'];
$data=str_replace("\'",'\'',$data);
echo $data;
$handle_1=str_replace($data,'',$handle);
$del_file="wordsfb.php";
//echo $handle;
//echo $data;
$fp3 = @fopen($del_file,"w");
@flock($fp3,2);
@fwrite($fp3,$handle_1);
@fclose($fp3);
echo "删除成功<br>";
}
echo "友情链接<br>";
$handle = @file_get_contents("wordsfb.php");
$handle=preg_replace('/\$wordsfb\[\'([^\["\']+?)\'\]=\'([^\["\']+?)\'\;/isUe',"'<br> \\1 替换成 \\2 <a href=\"ky.php?do=del&data=\$wordsfb[\\'\\1\\']=\\'\\2\\';\">删除</a>'",$handle);
echo $handle;
?>
</center>
</body>
</html>