Not if you want to go above this file. To do that, you need to have .. in the filepath. Beware that PHP will work with a current working directory from the executing script, so if you include this into another file that is where it will execute from.
$path = dirname(__FILE__) . sprintf('/../%s/gold.txt', $user);
if (false !== ($fh = @fopen($path, 'a+')))
Hopefully you're not using this to track a user's 'gold'. This will start really taking up space on you're server. If you're using something dynamic you should consider the use of a database to take care of you're persistent storage.