header('Location: http://www.example.com/');
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Content-type: text/html; charset=utf-8");
$j=1000;
g('s1');
echo '来自数据库:';
$db = new PDO('mysql:host=127.0.0.1;dbname=shua_net', 'qqtxt', 'zhh1981zhh');
g('s2');
for($i=0;$iprepare('update '.C('DB_PREFIX').'admin set username="admin'.$i.'" where admin_id=3');$sth->execute();$sth=$db->prepare('select username from '.C('DB_PREFIX').'admin where admin_id=3');$sth->execute();$a=$sth->fetchColumn();}
echo '初始化:'.g('s1','s2',8).' 执行:'.g('s2','s3',8);
g('ss1');
echo '
来自文件:';
for($i=0;$iget('phone');}
echo '初始化:'.g('sss1','sss2',8).' 执行:'.g('sss2','sss3',8);
echo "
$a
$b
$c
";
return;
结果
来自数据库:初始化:0.00124907 执行:3.03205800
来自文件:0.73245597
来自redis初始化:0.00031805 执行:0.13012195
admin999
admin999
admin999
用写读来破缓冲,都是1000次,原生redis完胜
统计某商家全部店任务缓冲 SELECT sum(total_num),sum(`undo_num`),sum(`doing_num`),sum(`back_num`),sum(`cmt_num`),sum(`sure_num`),sum(`finish_num`),sum(`withdraw_num`) FROM `je_task` where uid=15929 and pay_status=1 and withdraw_num=0
找某商家全部店SELECT count(*) FROM `je_task_item` where uid=15929 and status<3
找一个tiid生成了两个订单以上 select * from (SELECT toid,add_time,tiid,count(*) as c FROM `je_task_order` WHERE status1
最多返款 select shop_uid, count(*) as num from je_task_order where pay_status=0 and status<5 group by shop_uid order by num desc
找最多订单的 select shop_uid, count(*) as num from je_task_order where pay_status=1 and status1538841600 and status1536559626 and status=0 order by start_time
/etc/hosts文件修改后如何生效 sudo /etc/init.d/networking restart
开机挂载sudo dedit /etc/fstab 在末行回车添加类似,使用sudo mount -a对该配置文件生效。如果有问题会报错,根据问题再修改即可
/dev/sdb9 /media/yoqu/mylinux ext4 defaults 1 2
sudo chmod -R 755 a
sudo chmod -R 755 data
sudo chmod -R 755 dede
sudo chmod 755 .htaccess
sudo chmod -R 755 images
sudo chmod -R 755 include
sudo chmod 755 index.html
sudo chmod 755 index.php
sudo chmod -R 755 install
sudo chmod -R 755 logreport
sudo chmod -R 755 plus
sudo chmod 755 README.md
sudo chmod 755 robots.txt
sudo chmod -R 755 special
sudo chmod 755 tags.php
sudo chmod -R 755 templets
sudo chmod -R 755 uploads
sudo chmod 755 zip.php
sudo chown -R www:www a
sudo chown -R www:www data
sudo chown -R www:www dede
sudo chown www:www .htaccess
sudo chown -R www:www images
sudo chown -R www:www include
sudo chown www:www index.html
sudo chown www:www index.php
sudo chown -R www:www install
sudo chown -R www:www logreport
sudo chown -R www:www plus
sudo chown www:www README.md
sudo chown www:www robots.txt
sudo chown -R www:www special
sudo chown www:www tags.php
sudo chown -R www:www templets
sudo chown -R www:www uploads
sudo chown www:www zip.php