方法一 php教程用mysql的命令和shell select * into outfile './bestlovesky.xls' from bestlovesky where 1 order by id desc limit 0, 50; 方法二 把bestlovesky.xls以文本方式打开,然后另存为,在编码选择ansi编码,保存 echo "select id,name from bestlovesky where 1 order by id desc limit 0, 50;&qu
TXT文件: txt是微软在操作系统上附带的一种文本格式,文件以.txt为后缀. 从txt文件中读取数据: with open ('xxx.txt') as file: data=file.readlines() 将数据写入txt文件: with open ('xxx.txt','a',encoding='utf-8') as file: file.write('xxxx') 注:a表示append,将数据一行行写入文件 JSON文件: JSON指JavaScript对象表示法(JavaScri