On Friday 14 August 2009 08:31:46 pm דניאל דנון wrote:
> I'm building a little framework for my self,
>
> The configuration of the framework is done in an ini file,
>
> How do you suggest to hide its contents?
>
> .htaccess wont be good (or atleast only htaccess) since if its turned
> off....
>
> The file contains mysql password and important data.
>
>
> How should I make sure the file stays hidden from someone who might tries
> to access it?

Hello there,

1-) You have to parse ini file in each execution. It was negative for 
performance. I suggest use plain php array

2-) To hide your config put it in out of html document root.

define('ROOTDIR', dirname(__FILE__).'/');
define("CONFDIR",ROOTDIR.'../config/');

require(CONFDIR.'config.php');

Regards

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to