• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Views - Restricting resources question.

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.


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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.