To import from other php files I usually do this:
$include = explode('public_html', dirname(__FILE__)) . 'include/';
include $include . 'header.php';
It works great, and prevents all the ../../../../ relative path hackery.
But PHPStorm doesn't enjoy it that much, screaming that the file doesn't exist or that prevent me from using autocomplete with structures from that file or variables. I wonder if there is a way for me to tell the editor, the $include variable always is "/var/www/site/include" or something like that.