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/';

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章