Include File Security
Posted: Mon Nov 06, 2006 3:52 am
I'd like to include an external PHP file from a directory called "ads", using:
1. In terms of security is there anything I should keep in mind when using the include statement?
2. Is there anything I can add to this piece of code to make it more secure?
3. Also, since I used " ./ " in the path, to indicate that the sub directory is in the current direcory, will it still search in the includes directory first? Is there a better way to do this?
Thanks!
Code: Select all
<?php
include("./ads/file.php")
?>2. Is there anything I can add to this piece of code to make it more secure?
3. Also, since I used " ./ " in the path, to indicate that the sub directory is in the current direcory, will it still search in the includes directory first? Is there a better way to do this?
Thanks!