Closed r3sist closed 6 years ago
That's because you're mixing web syntax with shell syntax. It's:
php index.php /plan?folder=text
php index.php plan --folder=text
BTW there was a bug with the web syntax: $_GET
wasn't populated. Fixed in https://github.com/bcosca/fatfree-core/commit/3e34f37819dfbd85ff8637653e0041f0075e61ec
Thank you, that /
before plan
was it
Hi!
I'm trying to write a small cli script, however I couldn't access to cli options via GET.
My simplified code is:
If I call
php index.php /plan --folder=text
$f3->get('GET.folder')
or$f3->get('GET')
is empty array, while$f3->get('QUERY')
is ok and$f3->get('SERVER')
also has the arguments:Source: https://fatfreeframework.com/3.6/routing-engine#RoutinginCLImode f3: 3.6.2 php: PHP 7.2.0 (cli) (built: Nov 29 2017 00:14:49) ( NTS MSVC15 (Visual C++ 2017) x86 ) OS: Windows 10
Is it a bug or did I miss something?
Thank you for your help!