【发布时间】:2016-05-31 08:56:50
【问题描述】:
我正在为我的 PHP 框架使用 WAMP。我正在尝试测试此代码
<?php
require_once "C:\wamp\www\factual-php-driver-master\Factual.php";
$factual= new Factual("/*API Key*/","/*API Secret*/");
$query= new FactualQuery;
$query->limit(3);
$res= $factual->fetch("places", $query);
print_r($res->getData());
?>
我的 Factual.php 文件的 PATH 绝对正确,但文件返回以下错误
警告:require_once(C:\wamp\wwwactual-php-driver-master\Factual.php):无法打开流:在线 C:\wamp\www\foodmeets\restaurants.php 中的参数无效2
致命错误:require_once():在 C 中打开所需的 'C:\wamp\wwwactual-php-driver-master\Factual.php' (include_path='.;C:\php\pear') 失败:\wamp\www\foodmeets\restaurants.php 第 2 行
请注意,我已经使用命令对 PHP 安装环境进行了测试
php -f test.php yourFactualKey yourFactualSecret [logfile]
如 Github 上 PHP 的 Factual Driver(V3) 中所述(https://github.com/Factual/factual-php-driver)
【问题讨论】: