gpt4 book ai didi

php - 在此服务器上找不到cURL请求的URL/api/process.php

转载 作者:太空宇宙 更新时间:2023-11-03 15:06:37 25 4
gpt4 key购买 nike

我使用cURL为客户创建了一个API。我刚刚移到该域的新服务器,现在api不起作用。一切似乎都在模块上很好地工作,但是我无法使其正常工作:

这是我得到的回应。

Array ( 
[url] => https://www.1800pay.com/api/process.php
[content_type] => text/html; charset=iso-8859-1
[http_code] => 404
[header_size] => 179
[request_size] => 506
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.038607
[namelookup_time] => 0.002688
[connect_time] => 0.002737
[pretransfer_time] => 0.038372
[size_upload] => 0
[size_download] => 294
[speed_download] => 7615
[speed_upload] => 0
[download_content_length] => 294
[upload_content_length] => 0
[starttransfer_time] => 0.038597
[redirect_time] => 0 )
Curl error:

Not Found

The requested URL /api/process.php was not found on this server.

Apache/2.2.3 (CentOS) Server at www.1800pay.com Port 443


使用的代码:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.1800pay.com/api/process.php");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
//curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $output_transaction);
curl_setopt($ch, CURLOPT_POST, 1);

if (!($data = curl_exec($ch))) {print_r(curl_error($ch));echo "error";
return ERROR;
}
print_r(curl_getinfo($ch));
echo 'Curl error: ' . curl_error($ch);
curl_close($ch);

print_r($data);


谢谢您的帮助 :)
是的,文件存在于服务器上.....:|

最佳答案

答案在响应之内。一个未发现的错误就是这样。只要确保文件api / process.php在新域中存在。

关于php - 在此服务器上找不到cURL请求的URL/api/process.php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7116250/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com