this just hit me, and i dont know if anyone has thought of this and im just behind the times or not. if this is in the wrong forum, im sorry.
but, if you have files like .inc files, or files that you use in your php scripts that contain important data and you dont want anyone to view them, but still let your php script use them, you can make a directory below the public_html directory on the server, and then keep your files in it, then use the abolute directory path to link to it.
so instead of doing something like:
include "/home/user_name/public_html/directory/important_data.file";
you could do:
include "/home/user_name/php_includes/important_data.file";
i tried it and it works, and no one can possibly view your filethis is a great technique,and is known,but it's not very common knowledge.I have to agree with you that it's a good method ^^you should never keep anything important in an .inc file anyway. if it is important just put it in a .php file.
and not a lot of people have access above there root
but, if you have files like .inc files, or files that you use in your php scripts that contain important data and you dont want anyone to view them, but still let your php script use them, you can make a directory below the public_html directory on the server, and then keep your files in it, then use the abolute directory path to link to it.
so instead of doing something like:
include "/home/user_name/public_html/directory/important_data.file";
you could do:
include "/home/user_name/php_includes/important_data.file";
i tried it and it works, and no one can possibly view your filethis is a great technique,and is known,but it's not very common knowledge.I have to agree with you that it's a good method ^^you should never keep anything important in an .inc file anyway. if it is important just put it in a .php file.
and not a lot of people have access above there root