我将本地laravel 5项目迁移到我的AWS ec2 lamp Ubuntu服务器上。http://realtoraxe.com/realtoraxe/public/但它显示
InvalidArgumentException in SQLiteConnector.php line 34: Database does not exist.
我更改了sqlite 的database.php集
<?php
return array(
'default' => 'sqlite',
'connections' => array(
'sqlite' => array(
'driver' => 'sqlite',
'database' => 'http://realtoraxe.com/realtoraxe/storage/database.sqlite',
'prefix' => '',
),
),
);
?>
我把.env改成了
APP_ENV=local
APP_DEBUG=true
APP_KEY=mystring
DB_CONNECTION=sqlite
CACHE_DRIVER=file
SESSION_DRIVER=file
它仍然看不到数据库
storage_path
),但它确实支持env
函数。更多信息点击这里
这就是它无法定位数据库的原因。您应该在.env文件中定义数据库,或者在配置文件中使用完整路径。