Problem run via the command-line [SOLVED] |
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; Please helpme.
(09-07-2021, 09:08 AM)paulbalandan Wrote: Please show what code is in line 49 PHP Code: if (! function_exists('app_timezone')) Line 49 is: function app_timezone(): string If I delete this function, the same PHP Parse error appear next function has syntax "function {any_name} : string". I think Terminal don't accept syntax "function {any_name} : string". But This is Ci4 System file, I don't interfere
@paulbalandan, with your suggestion.
After Check Php Version, I found different between "php -v" and php_info(), I fixed it. My Problem has been fixed. Thanks you very much! For "Problem run via the command-line", We Check Php Version by syntax: "php-v" on terminal. Required php 7.2 or higher
Please edit your post and in the title on top add to the end [SOLVED]
Thank you. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |