微信支付前期准备工作1、已经认证的微信服务号(略)2、拥有微信支付权限3、下载微信官方SDK,并解压到ThinkPHP/ThinkPHP/Library/Vendor/WxPay/下
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)
array_column,获取数组中指定列的值,并使用某一列的值作为结果集的键
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)
本文主要是讲解如何在ThinkPHP下使用PHPExcel进行Excel的数据导出工作
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)
冒泡排序(Bubble Sort),是一种计算机科学领域的较简单的排序算法。
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)
在可以用file_get_contents替代file、fopen、feof、fgets等系列方法的情况下,尽量用 file_get_contents,因为他的效率高得多!
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)
本文实例讲述了PHP大转盘中奖概率算法的实现方法,分享给大家供大家参考。具体如下:大转盘是最近很多线上活动中一个比较有意思的东西了,下面我们就来看看这个大转盘中奖概率算法与例子,希望对各位有所帮助。
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)
我们做的简单评论功能会发现有提交很多的html标签了这些标签会导致页面有一些外链了,下面我们一起来看在PHP中过滤HTML表单中的非法字符
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)
程序调用自身的编程技巧称为递归( recursion)。递归做为一种算法在程序设计语言中广泛应用。 一个过程或函数在其定义或说明中有直接或间接调用自身的一种方法
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)
正则表达式---就是描述字符串排列模式的一种自定义语法规则,如果可以使用字符串处理函数完成的任务,就不要使用正则,有一些复杂的操作,只能正则完成.
'%3e%3cpath%20d='M624.68,512.43a16,16,0,0,1,0,22.63l-45.25,45.25a16,16,0,0,1-22.63-22.63l45.26-45.25a16,16,0,0,0,.19-22.43Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M602.25,490l-34.13-34.13h0L556.8,444.55a16,16,0,0,0-22.63,0l22.63-22.63a16,16,0,0,1,22.63,0l67.88,67.88a16,16,0,0,1,0,22.63l-22.63,22.63a16,16,0,0,0,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpolygon%20points='219.66%2038.63%20219.66%2038.64%20208.34%2027.32%20219.66%2038.63'%20fill='%23fff'%20/%3e%3cpath%20d='M534.17,444.55a16,16,0,0,1,22.63,0l11.32,11.32-45.26,45.25L511.55,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M466.29,557.68a16,16,0,0,1-22.62,0l-11.32-11.31,45.26-45.25,11.31,11.31a16,16,0,0,1,0,22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M443.67,557.68a16,16,0,0,0,22.62,0l-22.62,22.63a16,16,0,0,1-22.63,0l-67.88-67.88a16,16,0,0,1,0-22.63l22.62-22.63a16,16,0,0,0,0,22.63l22.63,22.63,33.94,33.94Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M421,421.92a16,16,0,0,1,22.63,22.63L398.41,489.8a16,16,0,0,0-.06,22.56L375.78,489.8a16,16,0,0,1,0-22.63Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3cpath%20d='M398.35,512.36l.06.07L375.78,489.8Z'%20transform='translate(-348.47%20-417.23)'%20fill='%23fff'%20/%3e%3c/g%3e%3c/svg%3e)