yii 下存放phpMyAdmin时,登录显示错误问题

在使用Yii框架的项目中,将phpMyAdmin部署于项目目录下时,登录后默认跳转至项目首页。通过修改phpMyAdmin配置文件中的PmaAbsoluteUri参数,成功解决了这一问题。

项目使用yii框架,为了方便将phpMyAdmin放在了项目目录下,结构如下:



结果登录phpMyAdmin的时候,却成功后默认跳转到项目首页了

查看了phpMyAdmin的源码,修改了一个配置就ok了

文件:phpMyAdmin\libraries\config.default.php,修改如下配置项

/**
 * Your phpMyAdmin URL.
 *
 * Complete the variable below with the full URL ie
 *    http://www.your_web.net/path_to_your_phpMyAdmin_directory/
 *
 * It must contain characters that are valid for a URL, and the path is
 * case sensitive on some Web servers, for example Unix-based servers.
 *
 * In most cases you can leave this variable empty, as the correct value
 * will be detected automatically. However, we recommend that you do
 * test to see that the auto-detection code works in your system. A good
 * test is to browse a table, then edit a row and save it.  There will be
 * an error message if phpMyAdmin cannot auto-detect the correct value.
 *
 * @global string $cfg['PmaAbsoluteUri']
 */
$cfg['PmaAbsoluteUri'] = ' http://www.your_web.net/path_to_your_phpMyAdmin_directory/';

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值