fpath = 'D:/test.txt'
with open(fpath, 'r') as f:
s = f.read()
print(s)
同样都是这个代码。怎么在网页里运行找不到文件呢?
服务器根本就没有这个路径的文件
孩子
肯定打开你的本地文件啊,网页去哪找你的D盘
Sign in to make a reply
用户7296618635
fpath = 'D:/test.txt'
with open(fpath, 'r') as f:
s = f.read()
print(s)
同样都是这个代码。怎么在网页里运行找不到文件呢?