-3
I’m having a hard time.
I’m in the localhost and I want to take the path of website to advance a link of a image
$uri = $_SERVER['HTTP_HOST'] . '/mvc_crud_pdo';
$iconeTransporte = $produtos->getTransporte() == 'Correios'
?'<img src ="' . $uri . '/imgs/iconeCorreiosCaminhao.png" style="height:45px;" title="Correios" />'
:<img src ="' . $uri . '/imgs/iconeTransportadoraCaminhao.png" style="height:45px;" title="Transportadora" />';
mvc_crud_pdo is the domain.
Something like:
http://localhost/mvc_crud_pdo
But the following is happening problem:
Note that in Elements, the link is correctly generated but in console gives error:
What must I do to correct this duplicity?
Note that the URL you want to generate, as well quoted, has the
http://
, but in your code at no time this is added to the value. Search for relative URL difference to absolute URL and understand the problem.– Woss
Thank you, I get it! That’s right!
– Carlos Rocha