Jump to content

[SOLVED] How can I echo the url into my page?


ballhogjoni

Recommended Posts

Has anyone who has suggested using $_SERVER['PHP_SELF'] tried it? It will not be what the OP is looking for. To get that string you have to use a combination like:

<?php
echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '/';
?>

 

Ken

It's no fun giving the exact answer, it's more fun to point them in the right direction and let them figure it out.

 

Has anyone who has suggested using $_SERVER['PHP_SELF'] tried it? It will not be what the OP is looking for. To get that string you have to use a combination like:

<?php
echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '/';
?>

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.