【发布时间】:2016-05-23 20:46:59
【问题描述】:
有下一个问题:在 MAMP 上安装了 php phantomjs。从这里制作所有使用说明:enter link description here
一切正常...然后我将所有站点文件复制到我的虚拟主机站点文件夹中,但没有任何效果。做了一个 var_dump 的响应并看到:
object(JonnyW\PhantomJs\Http\Response)#156 (8) { ["headers"]=> NULL ["status"]=> NULL ["content"]=> NULL ["contentType"]=> NULL ["url"]=> NULL ["redirectURL"]=> NULL ["time"]=> NULL ["console"]=> NULL }
为什么它不起作用,为什么都是 NULL? 我的代码是:
require __DIR__ . '/vendor/autoload.php';
use JonnyW\PhantomJs\Client;
$client = Client::getInstance();
$request = $client->getMessageFactory()->createRequest('http://jonnyw.me', 'GET');
$response = $client->getMessageFactory()->createResponse();
var_dump($response);
$client->send($request, $response);
echo $response->getContent();
【问题讨论】:
-
你可以通过 SSH 登录到你的服务器吗?
标签: php phantomjs php-phantomjs