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 : 搞一下午 .愁人,不过总算弄懂流程了!!

 

 

 

 

 

相关文章:

  • 2021-09-18
  • 2021-11-03
  • 2021-11-07
  • 2021-12-18
  • 2021-12-04
  • 2021-12-14
  • 2021-11-07
  • 2021-12-04
猜你喜欢
  • 2021-10-09
  • 2021-08-06
  • 2021-12-05
  • 2021-09-25
  • 2021-11-02
  • 2021-11-07
  • 2021-11-07
  • 2021-12-29
相关资源
相似解决方案