从网络服务中一无所获
Getting nothing from webservice
我正在写一个 API,我需要从 webhook ( Shopify ) 获取一些数据。
昨天它还在工作,但它突然停止了,即使我的 .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=&debug=&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();
}
它没有向 debug/debug_info.txt
写入任何内容,所以我的 s*** atm 有点丢了。
请帮忙?
显然其中一个所需文件中存在拼写错误。
原来这是报错:
function getProductsTable($csvFile = __DIR__ . '/../products.csv', $delimiter = ',')
#Somehow assigning csvFile like that doesn't work
谁会猜到...
我正在写一个 API,我需要从 webhook ( Shopify ) 获取一些数据。
昨天它还在工作,但它突然停止了,即使我的 .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=&debug=&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();
}
它没有向 debug/debug_info.txt
写入任何内容,所以我的 s*** atm 有点丢了。
请帮忙?
显然其中一个所需文件中存在拼写错误。
原来这是报错:
function getProductsTable($csvFile = __DIR__ . '/../products.csv', $delimiter = ',')
#Somehow assigning csvFile like that doesn't work
谁会猜到...