What's the relative path to a user's profile?
There is no, and can not be always correct relative path.

Relative path is relative, and there is no infinite amount of paths to user profile, to be in the same relation with each and every path in your system. There cannot be. What you need is to properly generate an absolute path instead. 

So instead of the code you are using, use Drupal's built-in link generator, l():

&lt;?php print l('some divs', 'user'); ?&gt;


or, if above is not feasible, url():

&lt;a href="&lt;?php print url('user'); ?&gt;"&gt; some divs... &lt;/a&gt;