Last active
March 21, 2017 13:14
-
-
Save nick-kravchenko/57ecc63d74e7989b1e22ac9e83483523 to your computer and use it in GitHub Desktop.
Deny acces for config files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$"> | |
Order Allow,Deny | |
Deny from all | |
</FilesMatch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Config::write('conf1.php', array( 'setting_1' => 'foo' )); | |
$config = MyConfig::read('conf1.php'); | |
$config['setting_1'] = 'test'; | |
$config['setting_2'] = 'test'; | |
Config::write('conf1.php', $config); | |
// http://php.net/manual/en/function.parse-ini-file.php | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment