AdminLTELogo
1
User Avatar Veto Wardana Putra

6 months ago

How to start coding

How to write hello world in CI 4
1
User Avatar Fahri Farih Kusuma

6 months ago

Hi Veto,

1. How to start coding
To start coding, choose a programming language that interests you. Look up online tutorials and learn courses. You can simply learn from Devslearn.com, there are many tutorials there. And practice regularly by working on small projects.

2. How to write hello world in CI 4

In CodeIgniter 4 (CI 4), you can create a "Hello World" controller by navigating to the `App/Controllers` directory and creating a file named `Hello.php` with the following content:

<?php

namespace App\Controllers;

class Hello extends BaseController
{
    public function index()
    {
        echo "Hello, World!";
    }
}

Then you can access this by opening your web browser and going to the URL corresponding to the `Hello` controller, usually something like `http://yourdomain.com/hello`.

Thanks for your question, hope it helps! Let us know if you have further questionsđŸ˜‰