Welcome Guest, Not a member yet? Register   Sign In
Problem run via the command-line [SOLVED]
#1

(This post was last modified: 09-08-2021, 02:54 AM by hieuhiti.)

Hi All,
I create a simple controller for run via the command-line. But When run:
Code:
php index.php tools/messages/to

error reporting system

PHP Parse error:  syntax error in /Users/rocker/www/democommand.vn/system/Common.php on line 49

I don't interfere Common.php file. Why error?

Controller I'm refer https://codeigniter.com/user_guide/cli/c...mmand-line

PHP Code:
namespace App\Controllers;

use 
CodeIgniter\Controller;

class 
Tools extends Controller
{
    public function message($to 'World')
    {
        echo "Hello {$to}!" PHP_EOL;
    }



Please helpme.
Reply


Messages In This Thread
Problem run via the command-line [SOLVED] - by hieuhiti - 09-07-2021, 01:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB