Install dan Struktur dasar codeigniter
To install CodeIgniter and set up the basic directory structure, follow these steps:
Step 1: Download CodeIgniter
Visit the official CodeIgniter website (https://codeigniter.com) and download the latest version of the framework.
Step 2: Extract the Files
Once the download is complete, extract the downloaded ZIP file to a location of your choice on your local development environment.
Step 3: Set up Directory Structure
After extracting the files, you'll find a directory called "codeigniter-x.x.x" (where "x.x.x" represents the version number). Rename this directory to your preferred project name.
Step 4: Configuration
Inside your project directory, you'll find a folder called "application." Open the "application" folder and locate the "config" folder within it. Inside the "config" folder, you'll find a file named "config.php." Open this file in a text editor.
Look for the following line of code:
php
Copy code
$config['base_url'] = '';
Set the base URL of your application by replacing the empty string with the URL where your CodeIgniter application will be hosted. For example:
php
Copy code
$config['base_url'] = 'http://localhost/myproject/';
Save the changes and close the file.
Step 5: Test the Installation
To verify that the installation was successful, open a web browser and navigate to your CodeIgniter application's base URL (e.g., http://localhost/myproject/). If everything is set up correctly, you should see the default CodeIgniter welcome page.
That's it! You have now installed CodeIgniter and set up the basic directory structure. You can start building your application by creating controllers, views, and models within the "application" folder.
Remember to refer to the CodeIgniter documentation (https://codeigniter.com/user_guide/) for detailed information on using the framework and its various features.