Google News
logo
CodeIgniter - Interview Questions
What is CLI? What is the use of CLI in Codeigniter ?
* CLI is a text-based command-line interface that can interact with computers through a defined set of commands.

* CLI in Codeigniter is used for the following purposes
 
* To run cron-jobs without using wget or curl.
* To make cron-jobs inaccessible from being loaded in the URL by checking the return value of is_cli().
* To make interactive "tasks" to perform tasks like run backups, set permissions, snip cache folders, etc.
* CLI also helps in integrating Codeigniter with other applications in different languages. For example, a random C++ script could call a command and run code in models.
Advertisement