目录结构更新,增加composer支持

This commit is contained in:
2018-01-14 09:40:04 +08:00
parent 3818619504
commit ae46a73172
945 changed files with 421 additions and 210179 deletions

View File

@@ -9,7 +9,7 @@
// SentCMS常量定义
define('SENTCMS_VERSION', '3.1.201706');
define('SENT_ADDON_PATH', ROOT_PATH . DS . 'addons' . DS);
define('SENT_ADDON_PATH', __DIR__ . '/../addons' . DS);
//字符串解密加密
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
@@ -1174,34 +1174,4 @@ function PyFirst($zh) {
}
}
return $ret;
}
/**
* 获取微信操作对象(单例模式)
* @staticvar array $wechat 静态对象缓存对象
* @param type $type 接口名称 ( Card|Custom|Device|Extend|Media|Oauth|Pay|Receive|Script|User )
* @return \Wehcat\WechatReceive 返回接口对接
*/
function &load_wechat($type = '') {
vendor('Wechat.Loader');
static $wechat = array();
$index = md5(strtolower($type));
if (!isset($wechat[$index])) {
$config = \think\Config::get('wechat');
$config['cachepath'] = CACHE_PATH . 'wechat/';
$wechat[$index] = & Wechat\Loader::get($type, $config);
}
return $wechat[$index];
}
if (!function_exists('getallheaders')) {
function getallheaders() {
$headers = [];
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) == 'HTTP_') {
$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
}
}
return $headers;
}
}