php - Symfony2 redirect to an externel url in new tab

404

I have a function that redirect to an external URL with parametre, but I want to redirect it to a new tab , This my code

 public function urlAction(){

    $directory= $user->getDirectory();
           return $this->redirect('http://localhost/sound/index.html?directory='.$directory );

}

I want to open the link in new tab. any suggestion please?

955

Answer

Solution:

The only answer possible here is that you can't redirect in a new tab.

You can provide links that open in a new tab or window using the target in html or a function in php, but you can't have a redirect.

People are also looking for solutions to the problem: php - How to add a "active" class to a carousel first element

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.