创建txt文件并写入内容 Thinkphp6

2023-03-31 14:09425
    //创建txt文件并写入内容
    public function RobotIdFileWrite($new_data='bg0')
    {
        $path = './easywechat.txt';
        if(!file_exists($path)){
            $myfile = fopen($path, "w");
        }
        file_put_contents($path, json_encode($new_data));
    }


上一篇: PHP换行符转br

下一篇: 使用ThinkPHP6,查询数据库数据,并导出Excel表格文件,PhpOffice

XML 地图