Restricted Access in PHP.. please help!!!
Posted: Thu Mar 26, 2009 9:57 am
Hi all,
I am a beginner to PHP coding. I have implemented most of my application by reading different forums. But now i m faced with a very big problem. It is a security issue and needs to be solved. I couldnt find a perfect solution for this. Please help me.
I am developing an application using PHP. I want to know whether there is a way to restrict the access of files by user directly without even logging in. For e.g in case of a web/app server like tomcat, the files inside WEB-INF/ folder are not accessible directly to the user. But in PHP i can go and type the path of any file present inside /var/www/html/myproject/....... Is there any way to restrict this access. If user tries to access any file inside some directory say view/ then he should be returned back to the login page. All those files should be accessible only through include().
Thanks,
Sanjay
I am a beginner to PHP coding. I have implemented most of my application by reading different forums. But now i m faced with a very big problem. It is a security issue and needs to be solved. I couldnt find a perfect solution for this. Please help me.
I am developing an application using PHP. I want to know whether there is a way to restrict the access of files by user directly without even logging in. For e.g in case of a web/app server like tomcat, the files inside WEB-INF/ folder are not accessible directly to the user. But in PHP i can go and type the path of any file present inside /var/www/html/myproject/....... Is there any way to restrict this access. If user tries to access any file inside some directory say view/ then he should be returned back to the login page. All those files should be accessible only through include().
Thanks,
Sanjay