On Jan 19, 2008 12:57 PM, Alain Roger <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to know how to avoid (using PHP code) any user to read the
> content of my website folder ?
> as my website is hosted by and external company, i do not have access to
> apache conf file.
you could take the code igniter approach.
have a script, like config.php, that has a constant; anything, like
define('IM_ALIVE', true);
then, require that all your scripts must have this file included, first
thing.
and at that point you can do something like this:
if(!defined('IM_ALIVE')) { die('no direct access to scripts allowed!'); }
-nathan