git clone git clone https://github.com/rainrocka/xinhu.git
mv xinhu/ oa/
mv /webmain/install/ webmain/
修改config/config.php下的$config
数组为:
$config = array(
'title' => 'OA',
'url' => '',
'urly' => '', //官网域名地址,修改后就无法提供在线升级了。
'db_host' => '127.0.0.1',
'db_user' => 'root',
'db_pass' => '',
'db_base' => 'oa',
'perfix' => 'oa_',
'qom' => 'oa_',
'highpass' => '',
'install' => true,
'version' => require('version.php'),
'path' => 'index',
'updir' => 'upload',
'dbencrypt' => false,
'sqllog' => true,
'checksign' => false, //列表请求是否验证
'memory_limit' => '', //运行内存大小
'db_drive' => 'mysqli', //数据库操作驱动
'db_engine' => 'MyISAM', //数据库默认引擎
'debug' => true, //默认debug模式
'reim_show' => true, //首页是否显示REIM
'mobile_show' => true, //首页是否显示手机版
'accesslogs' => false, //是否记录访问日志和限制IP
'upurl' => '', //上传文件附件地址(还不能使用)
);
rockxinhu
并替换为oa
xinhu_
并替换为oa_
sql里面的也要改use oa;source /oa目录/webmain/rockxinhu.sql
include->View.php
$actpath = $rock->strformat('?0/?1/?2?3',ROOT_PATH, $p, $d, $_m);
define('ACTPATH', $actpath);
$actfile = $rock->strformat('?0/?1Action.php',$actpath, $m);
$actfile1 = $rock->strformat('?0/?1Action.php',$actpath, $_m);
匹配视图函数路径
$actpath = $rock->strformat('?0/?1/?2?3',ROOT_PATH, $p, $d, $_m);
define('ACTPATH', $actpath);
$actfile = $rock->strformat('?0/?1Action.php',$actpath, $m);
$actfile1 = $rock->strformat('?0/?1Action.php',$actpath, $_m);
执行视图函数,视图可直接终止本次请求并响应(通常为json)
if(file_exists($actfile1))include_once($actfile1); // 导入视图
if(file_exists($actfile)){
include_once($actfile);
$clsname = ''.$m.'ClassAction';
$xhrock = new $clsname();
$actname = ''.$a.'Action';
if($ajaxbool == 'true')$actname = ''.$a.'Ajax';
if(method_exists($xhrock, $actname)){
$xhrock->beforeAction();
$actbstr = $xhrock->$actname(); // 执行视图
if(is_string($actbstr)){echo $actbstr;$xhrock->display=false;}
if(is_array($actbstr)){echo json_encode($actbstr);$xhrock->display=false;}
}else{
$methodbool = false;
if($ajaxbool == 'false')echo ''.$actname.' not found;';
}
$xhrock->afterAction();
}else{
echo 'actionfile not exists;';
$xhrock = new Action();
/var/log/apache2/access.log
/etc/php/7.0/apache2/php.ini
chown -R www-data:www-data /var/php