One trick is to put all the code in the include file into a function and call that function in your 'main' script. Then, if a user navigates to the file, nothing will be displayed in the browser because the function will not be called!!
Another (better) way is to create a folder (includes, say) above the root folder and store all of your 'include' files ther.
Paul.