Writetofile

From BMForum

Jump to: navigation, search

函数基本信息

文件:include/global.php

函数:function writetofile($file_name, $data, $method = "w")

说明

writetofile 可执行文件写入操作。

$file_name 为将要写入的文件路径,$date 为数据信息。

$method 为写入模式(具体请参考 http://www.php.net/fopen

这里简要介绍两种基本模式:

a - 追加模式,即将数据信息追加到文件末尾

w - 全新文件,即覆盖原有文件,将数据信息作为文件全部内容写入。

  • 若文件不可写,将会做出相应提示(仅在有管理员权限时)

参阅

big_write

readfromfile

Personal tools