2016-11-05 75 views
1

当我尝试做一个作曲家的更新,它出现以下消息:“致命错误无法连接到基址” 我使用symfony的3致命错误无法连接到基址

我希望你可以帮助我。由于

Error image

+0

如果你尝试'php作曲者更新'这是否有所作为? –

+0

Hi @Alvin,no。随着PHP作曲家更新,发生相同。 –

+0

看起来像你正在使用xampp。你可以尝试停止Apache,然后做'作曲者更新'?看看这是否有所作为? –

回答

0

既然你有XAMPP,这样做:

  1. 停止Apache。
  2. 运行composer update

这应该修复它!

namespace AppBundle\Controller; 

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 
use Symfony\Bundle\FrameworkBundle\Controller\Controller; 
use Symfony\Component\HttpFoundation\Request; 

class DefaultController extends Controller 
{ 
    /** 
    * @Route("/", name="homepage") 
    */ 
    public function indexAction(Request $request) 
    { 

     return $this->render('default/index.html.twig', [ 
      'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR, 
     ]); 
    } 
} 

到:

0

例如,在你的appbundle /的Controler/DefaultController

刚从删除阵列通过

参数

namespace AppBundle\Controller; 

...所有使用说明

class DefaultController extends Controller 
{ 
    /** 
    * @Route("/", name="homepage") 
    */ 
    public function indexAction(Request $request) 
    { 

     return $this->render('default/index.html.twig', [ 

     ]); 
    } 
} 
0

解决错误只是停止你的apache服务器并运行作曲家更新并再次启动Apache服务器和错误消失。我相信这会帮助你

相关问题