Exclude files ("header.php", "footer.php", etc) from showing up in SE results?

basically, i am making a website who’s pages are made up of php include statements:
so, for example, i would have one page titled “home.php” with the following php code in it:

<? include ("includes/header.php"); include ("includes/home_body.php"); include ("includes/footer.php"); ?>

i would also have another page titled “about.php” with the following php code in it:

<? include ("includes/header.php"); include ("includes/about_body.php"); include ("includes/footer.php"); ?>

and so on and so forth…

what i would like to know is how to exclude all the “includes” files (“home_body.php”, “header.php”, “footer.php”, “about_body.php”, etc…) from being shown in search engine results…

i know i could easily put a robots meta-tag for example in the “header.php” file like:

<meta name="robots" content="noindex" />

but wont that make the “about.php” file also not indexed? because by including the “header.php” file inside “about.php”, i am technically writing down “<meta name=“robots” content=“noindex” />” in the "about.php file as well?
am i right or wrong about this?

what is the proper way of using the robots meta tag? or are there any other solutions?
once again, i would just like to avoid my “includes” files from showing up in SE results… while leaving the other files (like “about.php”, “home.php”, etc.) show up in search results…