当我尝试从文件中发布数据时
headers = {'content-type': 'text/plain'}
files = {'Content': open(os.getcwd()+'\\1.txt', 'rb')}
contentR = requests.post("http://" + domain +"index.php", params=payload, data=files, headers=headers)
我得到类似 urlencoded 字符串的东西
Content=%3C%3Fphp+echo%28%22Hello+world%22+%29%3B+%3F%3E
代替
<?php echo("Hello world" ); ?>
如何在文本文件中发布数据?