Define the base url as a string, then append that constant to your include calls.
define("BASE_URL", "/var/www/httpdocs/");
include(BASE_URL . 'sample.php');
Its worth noting that once BASE_URL
is defined it can be used anywhere.
EDIT
Your last comment shows that you are unsure of what you are doing. Includes are done via the filesystem on the server or your local machine. They are nothing to do with the URL the domain or localhost.
// This means nothing as the include is done via the file system not via the URL
define("BASE_URL", "localhost:80");
include(BASE_URL . 'sample.php');
// This is what you need, a path on your file system to your included file
define("BASE_URL", "/var/www/httpdocs/");
include(BASE_URL . 'sample.php');