php artisan key:generate报错!artisan文件有错误?
#php artisan key:generate PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/snipe-it/artisan on line 31
#vi artisan 1 #!/usr/bin/env php 2 <?php 3 4 /* 5 |-------------------------------------------------------------------------- 6 | Register The Auto Loader 7 |-------------------------------------------------------------------------- 8 | 9 | Composer provides a convenient, automatically generated class loader 10 | for our application. We just need to utilize it! We'll require it 11 | into the script here so that we do not have to worry about the 12 | loading of any our classes "manually". Feels great to relax. 13 | 14 / 15 16 require DIR.'/bootstrap/autoload.php'; 17 18 $app = require_once DIR.'/bootstrap/app.php'; 19 20 / 21 |-------------------------------------------------------------------------- 22 | Run The Artisan Application 23 |-------------------------------------------------------------------------- 24 | 25 | When we run the console application, the current CLI command will be 26 | executed in this console and the response sent back to a terminal 27 | or another output device for the developers. Here goes nothing! 28 | 29 */ 30 31 $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); 32 33 $status = $kernel->handle( 34 $input = new Symfony\Component\Console\Input\ArgvInput, 35 new Symfony\Component\Console\Output\ConsoleOutput 36 );
You skipped including the answers to the issue template, so I don't know what you're working with here, but my guess would be that your version of PHP is too low: https://snipe-it.readme.io/docs/installation-issues#section-php-version-issues
Common installation/upgrading issues and solutions