==== PHP Tips ==== Code tips: $actual_link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; echo "Our URL: $actual_link

\n"; # the entire URL of the current page, including query string $url = $_SERVER['REQUEST_URI']; echo "\$_SERVER['REQUEST_URI'] ---> $url

\n"; # the base URL of the current page without query string $url_base = $_SERVER['PHP_SELF']; echo "\$_SERVER['PHP_SELF'] ---> $url_base

\n"; # The web host $host = $_SERVER['HTTP_HOST']; echo "\$_SERVER['HTTP_HOST'] ---> $host

\n"; # Just the path of the URL without the filename $path = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1); echo "Path of the URL without the filename ---> $path
\n";
More info on parsing the URL: http://php.net/manual/en/function.parse-url.php Showing errors: test \n"; $file=fopen("welcome.txt","r"); ?>