php - PHP SOAP - 给出不存在的 [HTTP] 内部服务器错误
问题描述
通过此处的文档https://itorrents.org/automation.php
我已经添加了他们的示例 torrent(用于测试的 Ubuntu x64)并按照说明添加了代码:
例子...
<?php
ini_set( 'soap.wsdl_cache_enabled', '0' );
$client = new SoapClient('http://itorrents.org/api/torrage.wsdl');
$infoHash = $client->cacheTorrent(base64_encode(file_get_contents('http://itorrents.org/torrent/B415C913643E5FF49FE37D304BBB5E6E11AD5101.torrent')));
echo $infoHash . "\n";
PS:另外,通过下载.torrent文件并添加到文件夹进行本地测试,同样的错误。(添加了直接链接,以便测试的人不必在他们的机器上下载它)
错误日志...
Fatal error: Uncaught SoapFault exception: [HTTP] Internal Server Error in /var/www/htdocs/test/soap.php:6 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://itorren...', 'urn:xmethods-de...', 1, 0) #1 /var/www/htdocs/test/soap.php(6): SoapClient->__call('cacheTorrent', Array) #2 {main} thrown in /var/www/htdocs/test/soap.php on line 6
解决方案
推荐阅读
- twitter-bootstrap - Bootstrap 4 Image没有响应和拒绝类
- python - Flask Python Gunicorn MySql - MySQL 连接不可用
- python-3.x - Python 多处理模块无法正常工作
- android - Gmail 更新后,纯文本共享(应用附件)不起作用
- php - php 中 Braintree 支付网关中的 SSLCaFileNotFound
- firebase - 如果电子邮件和密码在 Firebase Flutter 中无效,如何显示错误消息?
- mysql - 从表消息和已查看消息中获取未读消息计数
- jenkins - 清除 Jenkins 控制台输出页面中不可读字符的作曲家输出
- typescript - 用于访问 Set 的 typescript const 上下文
- android - 此处不允许使用元素按钮