写入log日志

$txt  = "写入日志的内容";

$log = fopen('./log.txt','a+');   //要写入的文件,权限根据需求设置

fwrite($log,var_expost($txt,true)); //写入文件。var_expost返回数据结构,数组转字符串

posted @ 2018-11-20 17:09  Dgaozhen  阅读(161)  评论(0编辑  收藏  举报