代码:$url = Env::get('root_path').'application/admin/test.txt'; //定义创建路径$file = fopen($url,"w");$content = "这是条测试数据";fwrite($file,$content);fclose($file);