我有一个Django应用程序,可以在服务器上创建PDF文件。在开发服务器上,它运行良好,但在IIS上,它不创建文件。我已经付出了所有的努力,但是没有运气。我写了一个简单的脚本来编写一个文本文件,但这在IIS上也不起作用。请提供解决此问题的任何帮助
多谢各位
def fileWriteTest(request):
f = open("media/testwrite.txt", "a")
f.write("Now the file has more content!")
f.close()
print("File Written!")
return HttpResponse("Done !")
FileNotFoundError位于/accounts/testfile/ [Errno 2]没有这样的文件或目录:“media/testwrite.txt”
我找到了一份工作
'''
从django.conf导入设置 导入操作系统
def fileWriteTest(请求):
'''
相关问题 更多 >
编程相关推荐