thinkphp 整合 ucenter
http://xcodebox.com/2013/06/8855.html 参考
1 ucenter源码目录下 /advanced/examples/api目录 copy到thinkphp项目根目录下
2 复制 ucenter源码目录下 /advanced/uc_client 目录 到thinkphp项目根目录下
3 修改 thinkphp项目/api/uc.php
里面有找不到类,
require_once DISCUZ_ROOT.'./conf.ucenter.php'; //ucenter配置文件,修改后的地址
require_once DISCUZ_ROOT.'./uc_client/lib/db.class.php'; //修改后的路径
/* $GLOBALS['db'] = new dbstuff;
$GLOBALS['db']->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect, true, $dbcharset);
$GLOBALS['tablepre'] = $tablepre;
*/
$GLOBALS['db'] = new ucclient_db;
$GLOBALS['db']->connect(UC_DBHOST, UC_DBUSER, UC_DBPW, UC_DBNAME, UC_DBCONNECT, true, UC_DBCHARSET);
$GLOBALS['tablepre'] = UC_DBTABLEPRE;
PS : 搞一下午 .愁人,不过总算弄懂流程了!!
PHP程序员
人在北京
如有需要,可以站内联系我!!!