Welcome Guest, Not a member yet? Register   Sign In
Views - Restricting resources question.
#1

[eluser]Unknown[/eluser]
Hi everyone.

I am building a system and ran into a snag.

I plan to have a single install of ci/mycode on the server and have each site run off of it. The only difference between the sites will be the views. Each site would consist of the index.php file and a views folder. I have all that working.

The sites will be for customers and that is where I ran into the problem.

Basically, is there anyway to allow PHP in the views but not allow access to the functionality of the system? For example, in a view you can easily echo config settings such as the database password. I didn't try yet, but I believe you could probably run db queries and load libraries, models, etc...

Is there a way to limit the views to only the data send to it?

Hope that makes sense.

Any suggestions on how to solve this issue will be appreciated.

Thanks
#2

[eluser]steelaz[/eluser]
I haven't tried this, but perhaps you can use CodeIgniter's Template Parser library for views and disable PHP in views directory using htaccess.




Theme © iAndrew 2016 - Forum software by © MyBB