I am trying to get amember working with codigniter.I am using Amembers datatbase and sessions. I am using the manual include PHP: $_product_id = array(1,3); include("aMember_Root_Dir/plugins/protect/php_include/check.inc.php"); But no matter where I put it I get an error that I cannot access that part of the site. I have tried putting it a the top of the controller file,within each individual controller i.e. PHP: function homepage(){ $_product_id = array(1,3); include("aMember_Root_Dir/plugins/protect/php_include/check.inc.php"); //load view here } And at the top of individual view files. Please Help!
Add global $_product_id; before $_product_id = array(1,3); line. I guess you try to include protection code inside function or include file, so $_product_id array is not available from check.inc.php