写入文件_调试方法
?
?
?
?
?
$word = getSomething();file_put_contents(ROOT_PATH."/path/to/words", "\n w1:".$word, FILE_APPEND);
?
file_put_contents(p1, p2, p3);
?
p1: 要寫入文件路徑(沒有會創建)
p2: 要寫入 的值
p3:?規定如何打開/寫入文件
1.FILE_USE_INCLUDE_PATH:檢查 filename 副本的內置路徑
2.FILE_APPEND:在文件末尾以追加的方式寫入數據
3.LOCK_EX:對文件上鎖
?
?
?
?
?
?
?
?
?
1
?
轉載于:https://www.cnblogs.com/Skate0rDie/p/11429334.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
- 上一篇: 部署GitLab时, 问题
- 下一篇: 关于小程序授权地理位置(wx.getLo