图像未在python中上载到php

图像未在python中上载到php,python,php,request,Python,Php,Request,我的python代码是: url=base_url+"/test.php"; global recording; sct=mss.mss(); monitor=sct.monitors[1]; im=sct.grab(monitor); raw_bytes=mss.tools.to_png(im.rgb, im.size); files = {'file': raw_bytes}; requests.post(url, files); 我的PHP代码是: <?php

我的python代码是:

url=base_url+"/test.php";
global recording;
sct=mss.mss();
monitor=sct.monitors[1];
im=sct.grab(monitor);
raw_bytes=mss.tools.to_png(im.rgb, im.size);
files = {'file': raw_bytes};
requests.post(url, files);
我的PHP代码是:

<?php
    print_r($_FILES);
    move_uploaded_file($_FILES["file"]["tmp_name"],$_FILES["file"]["name"]);
?>

但是,当我运行代码时。我找不到任何文件。
如何解决此问题?

请与我们分享您的调试工作,并向我们展示哪些似乎没有按预期工作。@lovelace代码应将屏幕截图发送到php页面,图像应存储在服务器上。但是,没有图像。