小弟是某公司一名php屌丝
来的时候.公司就是用的wecenter +XXX+XXX+XXX+XXX 无线多开源代码
无线整合,通信....
好了.现在分享 wecenter 站外调用方法. 
新建一个CLASS类,.,, 我的是放在 system/api.php
亲们随便放....
<?php
/*
+--------------------------------------------------------------------------
|   YangMeng 
|   ========================================
|   by WeCenter Software
|   © 2011 - 2014 WeCenter. All Rights Reserved
|   ppvke.com
|   ========================================
|   Support: 75674952@qq.com
|   本代码主要功能是站内外互通,调用.
|
+---------------------------------------------------------------------------
*/
include('system.php');
AWS_APP::init();
class main extends AWS_CONTROLLER
{
	public function index()
	{
		print_r($this->model('topic')->get_child_topic_ids($_GET['topic_id']));
	}
}
$m = new main();
$m->index();
exit;
?>
然后在修改system/aws_app.inc.php 
把 private static function init() 修改为 
public static function init()
OK 就这样.wecenter 的所有代码 亲您想怎么调用就怎么调用.
可以少写很多代码了... 这个类就是通信类...所有处理调用这个类就可以实现
如果闲麻烦. 可以直接在需要调用的位置
include('system.php');
AWS_APP::init();
wecenter 就可以全部调用了.
比如load_class('core_config')->get('database')->prefix 获取表前缀
AWS_APP::db()->fetchRow 操作数据库
get_setting('integral_system_config_reg') 获取系统配置  
等等..还是挺方便的...如果规范化的话. 最好是用类 这样好打理维护
 
                                                                
                                     阅读全文
                                
                                
                                     收起全文