PHP指定文件追加日志

xiaoxiao2021-02-28  104

function writeTo($path,$str){        $dirName = dirname($path);    $mode = 0777;        file_exists($path) ||  is_dir($path)  || @mkdir( dirname($path), $mode, true) || @shell_exec("echo '' > ".$path);              $fp = fopen($path, "a");             $num = fwrite($fp, $str);             fclose($fp);             return $num;     }       10833 11209  
转载请注明原文地址: https://www.6miu.com/read-31344.html

最新回复(0)