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

项目使用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/';

你可能感兴趣的:(yii 下存放phpMyAdmin时,登录显示错误问题)