在PHP写入字符串到TXT文件的代码方法
//$file:文件路径,$content要写入的字符串
function put_to_file($file, $content) {
$fopen = fopen($file, 'wb');
if (!$fopen) {
return false;
}
fwrite($fopen, $content);
fclose($fopen);
return true;
}
文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/114773.html<