CodeIgniter4: Bug: CLI request from command line
Direction Trying to run the CLI command through Visual studio code or CMD but zero response from the output that has been set. To be shure i’ve created an empty file with default index and an echo with text ‘test’. This still doesn’t respond in any way.
Describe the bug No response or execution on the coding when executing the controller/method through CMD.
command: php index.php cronjob index
Example:
namespace App\Controllers;
use App\Controllers\BaseController;
class Cronjob extends BaseController
{
public function index()
{
echo 'test';
}
}
CodeIgniter 4 version 4.1.3
Expected behavior, and steps to reproduce if appropriate A response as the documentation stated: Documentation command line
Context
- CI: 4.1.3
- OS: Windows 10
- PHP version: 8.0.7
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (1 by maintainers)
Make a fresh copy of Codeigniter and just add the Cronjob controller with the code you post. Start from there. If you want to give me access I can help you. Just let me know.