你可以定义写出文件的属性,你看一个PHP手册吧,FOPEN可以的。

解决方案 »

  1.   

    有 rw 这么一说吗?又是只读又是可写……?mode may be any of the following: 'r' - Open for reading only; place the file pointer at the beginning of the file. 'r+' - Open for reading and writing; place the file pointer at the beginning of the file. 'w' - Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'w+' - Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'a' - Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it. 'a+' - Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it. 
    Note: The mode may contain the letter 'b'. This is useful only on systems which differentiate between binary and text files (i.e. Windows. It's useless on Unix). If not needed, this will be ignored.