Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run without CLI? #10

Closed
simplenotezy opened this issue Oct 4, 2020 · 2 comments
Closed

Run without CLI? #10

simplenotezy opened this issue Oct 4, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@simplenotezy
Copy link

I'd like to run this script without CLI. I have tried requiring the library I see:

$isCLI = (php_sapi_name() === 'cli');
if (!$isCLI) {
    die('This file must run from a console session.');
}

Is there a way I can run this script without being in CLI? The reason being that many webhosts don't allow CLI.

@marcocesarato
Copy link
Owner

On last release (0.5.1.72) now you can pass arguments on run method.
You can take as example the src/index.php file.

Example of usage:

$app = new Application();
$app->run(["-a","--silent"]);

@marcocesarato marcocesarato added the enhancement New feature or request label Oct 4, 2020
@simplenotezy
Copy link
Author

That is very cool @marcocesarato! Thanks for getting back so quick. Will test out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants