gpt4 book ai didi

php - Fuel\Core\PhpErrorException [通知] : Undefined variable: error when configuring mysql db

转载 作者:行者123 更新时间:2023-11-29 17:04:23 24 4
gpt4 key购买 nike

我正在尝试配置我的数据库(下面的连接字符串)

return array(
'default' => array(
'connection' => array(
'dsn' => 'mysql:host=Webdatabase; dbname=web_btw',
'username' => 'btw_user',
'password' => 'pass12',
),
),
);

但是,我收到以下 PHPErrorException 通知(在我的 View 文件之一中):

<? if (isset($error)): ?><p class="error-msg"><?= $error ?></p><? endif ?>

如果可能的话,我想知道为什么会出现此错误消息,而我只想建立与我的fuelphp应用程序的数据库连接。

谢谢

最佳答案

感谢您的建议,但我已经通过在 php.ini 中启用 PHP 短标记来纠正错误来解决问题。

关于php - Fuel\Core\PhpErrorException [通知] : Undefined variable: error when configuring mysql db,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52119798/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com