📌  相关文章
📜  fwrite() 期望参数 2 是字符串,给定数组 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:36.441000             🧑  作者: Mango

代码示例1
//If you explicit need to put array in file you can do it with this

fwrite($handle, print_r($result, true));
//or you can convert it to json, like this

fwrite($handle, json_encode($result));
//And later when you read the file you can just undo the action with 
//json_decode($your_file_content)