1) don't use extensions that the web server will handle as plain text, such as .inc . instead give your included files a .php extension also.
2) place code outside of the web root and use php include() functions to include the files. remote users now can't request your secret_password.php include file.
the only thing left now is html & possible misconfiguration problems. if something should fail and the web server starts sending out .php files as plain text, they'll only contain minor php functions and the include() functions.