'value1', 'param2' => 'value2' ); $options = array( 'http' => array( 'header' => 'Content-type: application/x-www-form-urlencoded\r\n', 'method' => 'POST', 'content' => http_build_query($data), ), ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); $file_url = trim($result); // 获取输出的文件地址 header('location:' . $file_url); // 跳转到文件地址 ?> PHP调用HTTP接口获取文件地址并跳转

原文地址: https://www.cveoy.top/t/topic/np8D 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录