Forum Moderators: phranque
<Files ~ "\.php$">
Order Deny,Allow
Deny from all
</Files>
If that's not an option, then the .htaccess file is the way to go. Your .htaccess is, I assume, in the includes/ directory? Is 'AllowOverride Limit' turned on for your document root (or at least the includes/ directory)? You can try sticking some invalid directives in your .htaccess file and see if that breaks things; if it doesn't, the .htaccess file likely isn't being parsed.
Note that if you *do* get this working, you won't need to add localhost to the allow list; the deny/allow directives are designed to limit HTTP access. When you include() a local file, no HTTP request is being made for the file; PHP just opens it locally; 'Deny from all' will work fine.
AllowOverride cannot be set in a .htaccess file; it needs to be set in httpd.conf. Since its purpose is to control what can and cannot be placed in a .htaccess file, allowing *it* to be placed in a .htaccess file would be silly, yes? =)