几个重点,
1,文本记录数据落地点,2,死循环断开点 3,防止sql断开连接(MySQL server has gone away)4,防止php超时
5,日志跟踪 6,递归处理数据(业务需求),7,正则匹配数据(业务需求)增强程序的可执行性
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/9/8 0008
* Time: 上午 10:52
*/
global $_G;
echo $_GET['exec'] !== 1;
if ($_GET['exec'] !== '1') {
exit('Pemission denied');
}
if ($_GET['val'] !== null) {
$fidArr['val'] = $_GET['val'];
}
$pid =isset($_GET['pid']) ? $_GET['pid'] : 0;
//获取所有数据表
$sql = 'SELECT fid FROM ' . DB::table('forum_forum');
$resource = DB::query($sql);
$re = DB::fetch_all($resource);
$fidArr = array_unique(array_column($re, 'fid'));
//切换数据库连接
$object = DB::object();
$object->set_config($_G['config']['db'