我正在尝试使用php将用Javascript编写的数组写入带有回车符和换行符分隔行的csv文件。下面的代码将csv文件写入,但是全部写在一行上。谁能告诉我如何更改它以在每行之间包含回车符/换行符分隔符?谢谢
def serviceMyRequest(request: Request): IO[ServiceResult] = ...
def myAction = Action { request =>
val ioServiceResult = for {
_ <- IO.shift(myCustomExecutionContext)
serviceResult <- serviceMyRequest(request)
_ <- IO.shift(defaultExecutionContext)
} yield {
serviceResult
}
handleServiceResult(ioServiceResult.unsafeRunSync())
}