FuelPHP机油迁移不起作用 [英] FuelPHP Oil Migration not working

查看:85
本文介绍了FuelPHP机油迁移不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了xampp,并且想要让FuelPHP正常工作.一切似乎都正常,我脚手架上想要迁移的东西.但是我得到了错误

I have xampp installed and want to get FuelPHP working. Everything seems to work fine, I scaffolded some stuff, that I want to migrate. But I get the error

Error - invalid data source name in COREPATH/classes/database/pdo/connection.php on line 94

我的db.php看起来像这样:

My db.php looks like this:

return array(
  'default' => array(
    'type' => 'pdo',
    'connection' => array(
      'dsn' => 'mysql:host=127.0.0.1;dbname=pfpg',
      'username' => 'root',
      'password' => '',
      'persistent' => false,
      'compress' => false,
    ),
  ),
);

我以前没有持久"和压缩"的情况尝试过,没有用.数据库名称正确,用户名也正确.我也尝试了'mysql:host = localhost'.我不明白我做错了什么...

I tried it without the 'persistent' and 'compress' before, didn't work. Database name is correct, username too. I also tried it with 'mysql:host=localhost'. I don't get what I did wrong...

如果您需要更多信息,请询问!

If you need more information, ask away!

推荐答案

我配置了错误的db.php文件,但我不知道,有不止一个. fuel/app/config/development/db.php是正确的文件,因此取决于环境

I configured the wrong db.php file, I didn't know, there was more than one. fuel/app/config/development/db.php was the right file, so it depends on the environment

这篇关于FuelPHP机油迁移不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆