Php 从Web服务中一无所获
我正在编写一个API,我需要从webhook(Shopify)获取一些数据 昨天它还在工作,但是它突然停止了,即使我的Php 从Web服务中一无所获,php,.htaccess,webhooks,Php,.htaccess,Webhooks,我正在编写一个API,我需要从webhook(Shopify)获取一些数据 昨天它还在工作,但是它突然停止了,即使我的.htaccess文件看起来和我正在处理的另一个副本一样 webhook的地址为: 以下是.htaccess中的一些片段: ## default index file DirectoryIndex index.php ## rewrite everything else to API.php RewriteCond %{REQUEST_URI} /([^/]+)(
.htaccess
文件看起来和我正在处理的另一个副本一样
webhook的地址为:
以下是.htaccess
中的一些片段:
## default index file
DirectoryIndex index.php
## rewrite everything else to API.php
RewriteCond %{REQUEST_URI} /([^/]+)(?:/API-NEW)
RewriteRule ([a-zA-Z0-9_-]*)\.(service|test)$ index.php?action=$1&debug=$2&shop=%1&%{QUERY_STRING} [nc,qsa,L]
这是我的index.php
:
<?php
require_once 'configs.php';
require_once 'helpers/helpers.php';
require_once 'helpers/io_helpers.php';
$date = date(DATE_RFC2822);
file_put_contents('debug/debug_info.txt', 'Request started', FILE_APPEND);
if (in_array($_GET['action'],array('insertOrder','updateOrder'))){
writeToDebug($date . " --> New: " . $_GET['action']);
getRequest();
}
显然,其中一个所需文件中存在打字错误
结果表明,这是一个错误:
function getProductsTable($csvFile = __DIR__ . '/../products.csv', $delimiter = ',')
#Somehow assigning csvFile like that doesn't work
谁会想到…您是否检查了文件夹/文件权限?查看错误报告是否泄漏了任何信息,并检查日志。另外,您是如何执行getRequest()
和writeToDebug()
函数的?“webhook的地址是:h.t.t.p://Mywebsite”-您的意思是http://Mywebsite
正确吗?它没有到达那个部分。。我正在检查它是否工作,如果它将某些内容打印到调试文件,但是not@Fred-ii-是的,但实际上会使其成为超链接。我怎样才能把这些错误放到我的调试文件中去呢?你已经取消了我的编辑