does following this work on linux server?
<? require 'foldername/header.php' ?>
the above code is present in home.php. home.php is in folder foldername.
No. You want:
require 'header.php';
because you're already in foldername.
It depends on how your php.ini is set up but the default behaviour is to look in the current directory and the include directory or directories (if any) so "foldername/header.php" is relative to the path of the home.php script.