作者andreli (大学生)
看板PHP
标题Re: [请益] 请问phpMyadmin的验证机制
时间Thu Jan 11 11:01:39 2007
※ 引述《jimshsu (jims)》之铭言:
: 依据你的建议
: 我找到这两个档
: config.inc.php user_password.php
: $cfg['Servers'][$i]['auth_type'] = 'config';
: // Authentication method (config, http or cookie based)?
: $cfg['Servers'][$i]['user'] = 'root'; // MySQL user
: $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
: // with 'config' auth_type)
: 我搞不太清楚cookie跟http模式的差别
: 不知道是否有版友了解?
: 因为不同的帐号有不同的资料表
: 所以在我的案例预先写好帐号密码的config显然不行
: 我现在问题是不知道要写什麽变数到session或cookie让myadmin直接可以针测到变数
: 因为phpMyAdmin在http的登入方式~~到底登入後
: 在各个操作页面~~他是如何确认使用者的登入状态?~
: 这点我还搞不懂~~XD
: 若有其他建议~~请多指教
: 谢谢
不是不是,你误会我的意思了,
我记得auth_type有一种是完全不做认证的,只是我忘记了(是config吗?)
我的想法是:
检查身份的session,如果正确$auth_type="config"
如果不正确,exit
然後把
$cfg['Servers'][$i]['auth_type'] = 'config';
改成
$cfg['Servers'][$i]['auth_type'] = $auth_config;
把上面这个想法写成程式加在config.inc.php的开头,
感觉上应该可以work,实作上就不知道会遇到什麽困难了.
--
我知道这个世界很无情。
http://blog.pixnet.net/andreli
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 125.229.203.138