爱玺玺

爱玺玺的生活日记本。wx:lb87626

webuploader上传图片进度条原理

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8&quo

webuploader上传图片基本代码

链接:https://pan.baidu.com/s/1Fj6ffsjBJgANMK-QPlcCLA 

提取码:g1wc 

复制这段内容后打开百度网盘手机App,操作更方便哦


thinkPHP3.2.3关联查询

<?php

namespace Model;

use \Think\Model\RelationModel;

class ManagerModel extends RelationModel{

织梦sql标签调用文章url链接地址

{dede:sql sql='Select arc.title,arc.litpic,arc.id from mzm_archives arc left join mzm_addonarticle addon  on addon.aid = arc.id 

where find_in_set(arc.typeid,(select group_concat(id) from mz

织梦sql标签在文档页调用当前文档的id就是~id~,sql标签调用文章列表。

{dede:sql sql='Select arc.title,arc.litpic from mzm_archives arc left join mzm_addonarticle addon  on addon.aid = arc.id 

where find_in_set(arc.typeid,(select group_concat(id) from mzm_arctype where reid=(select reid from mzm_a

解决mysql的group_concat不能作为in条件问题,使用find_in_set注意一定要括号,调了n久

mysql> Select typeid,title from mzm_archives where find_in_set(typeid,(select group_concat(id) from mzm_arctype where reid=103));

+--------+----------+

| typeid | title    |

+----

mysql将收索的结果前后加特定字符,比如引号等。

mysql> select concat('\'',group_concat(id),'\'') from mzm_arctype where reid=(select reid from mzm_arctype where id=(select typeid from 


mzm_archives where id=21));

+-------------------------

mysql收索字段合并成以逗号分割的字符串 group_concat(id)

select group_concat(id) from mzm_arctype where reid=(select reid from mzm_arctype where id=(select typeid from 


mzm_archives where id=21));


ThinkPHP路由参数

QQ图片20190122132822.gif

这里new后面的hello就是路由里面参数name的值,实际就是name=hello。

可以在控制器里面就收 $_GET['name']。收到的值就是hello。

ThinkPHP路由原理

QQ图片20190122122748.gif


路由就是将url地址经过一定规则改写。

config.php配置路由规则:

<?php

return array(

Powered By Z-BlogPHP 1.4 Deeplue Build 150101

Copyright Your WebSite.Some Rights Reserved.

蜀ICP备11021721号-5