'@'.realpath($path).";filename=".$filename);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$return_data = curl_exec($ch);
curl_close($ch);
$decode = json_decode($return_data);
echo $decode->original_pic;
}
if ($_POST) {
$url = 'https://127.0.0.1/img.php';
$tmpname = $_FILES['fname']['name'];
$tmpfile = $_FILES['fname']['tmp_name'];
upload_file($url,$tmpname,$tmpfile);
exit;
}
echo '';
?>
代码如上,为什么删掉就无法执行post?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
有没有什么错误信息啊!贴出来看看
。。。应该有报错的啊,执行是空返回吗?那只能打断点看看那一步出问题