帮帮忙,看这个问题怎么解决 本帖最后由 l2x11 于 2010-03-02 20:52:34 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 echo str_replace('/test/','this','this is a test'); 假设 echo "this is a test" >test.txt$filename = "test.txt"$fp = fopen($filename,"r"); //只读打开txt$str = fread($fp,filesize($filename));//读取内容$replace = "this";$str = str_replace("test",$replace,$str);fclose($fp);重新写入文件$handle = fopen($filename,"w"); //写入方式打开fwrite($handle,$str); //写入strfclose($handle);然后cat test.txt $s = 'this is a test';preg_match_all('/[^ ]+/', $s, $r);$ret = join(' ', array_reverse($r[0]));echo $ret; // test a is this explode 还是方面些..不准用这个.脑袋被门夹了.. PHP中怎么能显示系统当前的日期和时间!!谢谢 php 如何接收ECHO的值? 问一个超级小白的问题. 也是,看了半天文档测试,英文的调试老是不行,希望高手给个具体例子,不甚感谢,学习中!!! 简单问题啊..快来捡分 高分求救:如何才能让某字段取出的内容当做字段一样显示 200分求一提交表单的问题 画图问题 关于SESSION的问题。 一个有关limit的问题: 如何计算前30天是哪天? 这种json如何读取
$fp = fopen($filename,"r"); //只读打开txt
$str = fread($fp,filesize($filename));//读取内容
$replace = "this";
$str = str_replace("test",$replace,$str);
fclose($fp);重新写入文件
$handle = fopen($filename,"w"); //写入方式打开
fwrite($handle,$str); //写入str
fclose($handle);然后cat test.txt
preg_match_all('/[^ ]+/', $s, $r);
$ret = join(' ', array_reverse($r[0]));echo $ret; // test a is this
不准用这个.脑袋被门夹了..