Relative and / or absolute path in PHP

0

I've done some StackOverflow searches on absolute path and relative path , but none of the solutions worked for what I need. I need the $host (example below) to point to where my index.php is dynamically, that is, if I change the hosting I do not need to manually change the address. Any suggestions?

$host."index.php?id=2&url=".$link."&title=".$noticia."&s=1&logo=".$foto;

$host = "http://exemplo.com.br/teste/"
    
asked by anonymous 02.10.2017 / 13:21

0 answers