'写入文件
Function WriteFile(filename)
set fso=createobject("scripting.filesystemobject")
filepathx=server.mappath(filename)
set f=fso.createtextfile(filepathx,true)
f.writeline(list)
f.close
End Function

解决方案 »

  1.   

    function writefile($filename) {
    $fp = fopen($filename, 'W+'); 
    if (!$fp) return;   
    fputs($fp, "aaa\nbbb\nccc"); 

    fclose($fp);
      }应该这样的吧,好久没有写PHP了,试试
      

  2.   

    function WriteFile($filename, $list){
      file_put_contents($filename, $list);
    }
      

  3.   

    那么这一段用PHP该怎么写呢?
    <%
    list=Request.form("content")
    WriteFile("/index.html")
    Response.write "更新成功!"'写入文件
    Function WriteFile(filename)
    set fso=createobject("scripting.filesystemobject")
    filepathx=server.mappath(filename)
    set f=fso.createtextfile(filepathx,true)
    f.writeline(list)
    f.close
    End Function
    %>
      

  4.   

    <?
    function WriteFile($filename, $list){
      file_put_contents($filename, $list);
    }
    $list = $_REQUEST['content'];
    WriteFile("index.html",$list);
    echo "ok";
    ?>
      

  5.   

    楼上的,你写的提示错误
    Fatal error: Call to undefined function: file_put_contents() in d:\clientweb\dsfsaas\wwwroot\admin\writefile.php on line 5