mirror of
https://ghproxy.net/https://github.com/wp-cli/wp-cli-bundle.git
synced 2025-10-04 05:03:29 +08:00
Better wording for php-cgi error
Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>
This commit is contained in:
parent
1f4c492cd8
commit
39dff319eb
1 changed files with 5 additions and 5 deletions
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
if ( 'cli' !== PHP_SAPI ) {
|
||||
echo "Only PHP-CLI access.\n";
|
||||
echo "You're currently using the " . PHP_SAPI . " PHP SAPI.\n";
|
||||
echo "If you're trying to run this file with a web browser, don't.\n";
|
||||
echo "When running in command line, ensure that `php -v` has the\n";
|
||||
echo "word \"cli\" in the first line of output.\n";
|
||||
echo "WP-CLI only works correctly from the command line, using the 'cli' PHP SAPI.\n",
|
||||
"You're currently executing the WP-CLI binary via the '" . PHP_SAPI . "' PHP SAPI.\n",
|
||||
"In case you were trying to run this file with a web browser, know that this cannot technically work.\n",
|
||||
"When running the WP-CLI binary on the command line, you can ensure you're using the right PHP SAPI",
|
||||
"by checking that `php -v` has the word 'cli' in the first line of output.\n";
|
||||
die( -1 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue