我在我的 cpanel 中托管 laravel 5.1,但它总是出现错误。我尝试了每种方法(htaccess、chmod 644 和存储给出或 r+W),但它在我的 cpanel 中不起作用,但当我从索引中删除以下行时:公共文件夹的 php 它可以访问 index.php 文件:
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
Run Code Online (Sandbox Code Playgroud)
所以它可以访问我的文件夹。有谁能够帮助我?是不是cpanel的php版本导致的?
我尝试了各种方法来解决这个问题,比如清除缓存、composer 更新/安装,但之后php artisan config:cache,它又出现了。
在 config.php 第 839 行:
调用未定义的方法 Illuminate\Validation\Rules\In::__set_state()
整页变成空白页。在bootstrap/cache/config.php文件中,它显示:
'environment' =>
array (
'form' =>
array (
'rules' =>
array (
'app_name' => 'required|string|max:50',
'environment' => 'required|string|max:50',
'environment_custom' => 'required_if:environment,other|max:50',
'app_debug' =>
array (
0 => 'required',
1 =>
Illuminate\Validation\Rules\In::__set_state(array(
'rule' => 'in',
'values' =>
array (
0 => 'true',
1 => 'false',
),
)),
),
Run Code Online (Sandbox Code Playgroud)