PHP Forum

get url?

how do i get the url of the page i'm currently on, on my website.. i think its get header.. how do i do that?
Advertisement

2 answers

Admin ·

Hope this solves your problem. Try this.







<?php

$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

echo $url;

?>



Boss Lyric ·

Puff Puff Lyrics Just like this you can create the link of any post...

Your answer

Login to answer

Trending today: see what people are reading