Suppose my website is
http://www.myweb.com/blahblah/index.php
How do I return the base URL, i.e. http://www.myweb.com
in PHP. Is there a predefinded variable?
Thank you
Yes there is, you can use the $SERVER["SERVER_NAME"] or $SERVER["HTTP_HOST"] I think one of those return the host name, you can see the content of $SERVER just doing a print_r ( $SERVER );
www.oksonora.com OKSonora