Restrict PHP files outside application folder in CodeIgniter?
问题 How can I restrict PHP files from getting executed outside the application folder? I am using CodeIgniter and I have heard it somewhere that this thing is possible in CodeIgniter. 回答1: Temporary, I have added request in htacess which will surpass each request from index file and will result in not found. 回答2: Add public folder, move index.php into it, inside index.php change application and system folder settings to ../application and ../system respectively. Point domain to public folder. 来源: