在Ubuntu的Digital Ocean上安装了新的Laravel。当前的PhP安装。我添加了几行代码以吐出错误,Apache2可以很好地访问Php。这是输出:
解析错误:语法错误,第388行上的/var/www/html/blog/vendor/laravel/framework/src/Illuminate/Support/Arr.php中出现意外的'='
public static function pluck($array, $value, $key = null)
{
$results = [];
[$value, $key] = static::explodePluckParameters($value, $key);
foreach ($array as $item) {
$itemValue = data_get($item, $value);
// If the key is "null", we will just append the value to the array and keep
// looping. Otherwise we will key the array using the value of the key we
// received from the developer. Then we'll return the final array form.
if (is_null($key)) {
$results[] = $itemValue;
} …Run Code Online (Sandbox Code Playgroud)