可以啊
直接readfile($file)就可以了

解决方案 »

  1.   

    直接readfile($file)就可以了具体该怎么办啊
    多谢了
      

  2.   

    <?php
    readfile("post.htm");
    ?>
      

  3.   

    还是不明白
    我举个例子
    比如说有个top.htm,它里面的内容是<font color=red>{name}</font>
    假如
    readfile("top.htm");
    然后用什么替换?
    怎么个显示法?
    是不是直接用浏览器浏览的时候,就已经自动替换为了top.htm中的内容了?
    多谢
      

  4.   

    这样就要用
    $s=file_get_content("top.htm");
    str_replace('{name}','xxxxxx',$s);
      

  5.   

    $s=file_get_content("top.htm");
    $s=readfile("top.htm");他们有什么区别那
      

  6.   

    不行啊
    浏览器没有任何显示
    我用bushi 代替{name}
    可是浏览器没有任何反应阿
    为沙阿
      

  7.   

    $s=file_get_content("top.htm");
    echo str_replace('{name}','xxxxxx',$s);
      

  8.   

    $s=readfile("top.htm");相当于$s=file_get_content("top.htm");
    echo $s;
      

  9.   

    <?php
    readfile("2.htm");
    str_replace('{name}','baolima');
    ?>
    这样子不行啊,提示{name}
    Warning: Wrong parameter count for str_replace() in D:\http\test\2.php on line 3
    到底该怎么写啊
    郁闷
      

  10.   

    $s=file_get_content("top.htm");
    echo str_replace('{name}','xxxxxx',$s);
    提示错误:Fatal error: Call to undefined function: file_get_content() in D:\http\test\2.php on line 2
      

  11.   

    $s=file("top.htm");
    $s=implode("",$s);
    echo str_replace('{name}','xxxxxx',$s);