拒绝访问Web根目录中的文件和文件夹,而不使用.htaccess

Is it possible to deny access to files and folders within the web root without using .htaccess or file permissions? A universal solution that works with all servers?

This relates to a flat-file framework I'm making with PHP where the requirement is basically "drag the project folder in the web root to launch the site." The other goal is for there to be a front-end interface where the client can log in and edit content.

I deal a lot with shared hosting accounts where I can't always change the web root. Additionally, I don't necessarily want to rely on developers manually setting file permissions. The reason why I don't want to use .htaccess is that, one, it relies on the host being an Apache server, and, two, it relies on specific Apache settings.

EDIT: specificity

This was answered here with a couple of really great answers you'll probably find useful: Prevent access to files from Apache without .htaccess

The first suggests setting permissions to be inaccessible and CHMODDing them with PHP when you need to access them.

The second suggested you place them outside of your web root but keep them accessible by PHP (using include(), I would assume).

Either or should accomplish what you're hoping. (Wish I could comment stuff like this.)