Jump to content

PHP help with how to get the url


syntax101

Recommended Posts

php how do i get the url of my website and put it i a variable and cut the address

 

 

ex: http://localhost/index.html

 

result in a variabl would be

 

var="http://localhost/"

 

other example

 

http://123.168.1/index.html

 

result in a variable would be

 

var="http://123.168.1/

 

NOTE: the remaing characters will not be included when put in a variable like "index.html"

Link to comment
https://forums.phpfreaks.com/topic/81508-php-help-with-how-to-get-the-url/
Share on other sites

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.