无论我做什么,我总是得到一个
Symfony\Component\HttpKernel\Exception\NotFoundHttpException:“没有找到 [...] 的路由”
在$crawler->text()
,当我尝试使用 请求外部 URL 时$crawler = $client->request('GET', 'http://anotherdomain.com');
。
我想这样做是因为我正在使用另一个虚拟主机来渲染一些带有 Symfony 1.2 的页面和一些带有 Symfony 2.3 的页面。
我也试过
$client = static::createClient(array(), array('HTTP_HOST' => 'anotherdomain.com'));
$client->followRedirects(true);
但它总是试图在 Symfony 2 中渲染它。