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-16
  • 2021-09-25
  • 2022-01-29
  • 2022-02-03
  • 2021-11-26
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-05
  • 2022-12-23
  • 2021-05-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案