Once you’ve finished testing the site on the production or test server is time to make sure that you won’t have any surprises from your evil “visitors”. So, try to put the application and system folders in a folder that is not accessible from the web. If you are on a shared server, you should put the index.php in “public_html” folder. After that, create a folder (maybe named “ci”?) on same level as public_html folder.
So, the structure of the files would look something like this:
Now, if you visit your “site” you should see the following error: “Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php“.
To resolve this issue, go to your public_html/index.php and in there change $system_path to where you moved your system folder. In our case that should be:
Do the same with $application_path:
- Step 1: First contact – What is MVC and what is CodeIgniter
- Step 1.1: Again about MVC and CodeIgniter – The controllers
- Step 1.2: Again about MVC and CodeIgniter – The views
- Step 1.3: Again about MVC and CodeIgniter – The models
- Step 2: Set up the environments
- Step 3: Set up the database that will be used by CodeIgniter
- Step 4 – Removing the index.php from the URL and allow the use of “search-engine friendly” URLs
- Step 5 – Final settings. Finishing the configuration of your CodeIgniter
- Step 6 – Verify CodeIgniter configuration. Is everything OK?
- Step 7 – Using CodeIgniter and Composer – with a real world example
- Step 8 (optional) – Using sessions with database in CodeIgniter
- Step 9 – No more MY_Controller monopoly. How you can create more than one base controller
- Step 10 – Make your first library: a breadcrumb generator
- Step 11 – Creating and working with the famous MY_Controller
- Step 12 – Creating and using page templates in CodeIgniter
- Step 13 – Uploading multiple files (images) in CodeIgniter
- Step 14 – Crop and resize uploaded images in CodeIgniter