Where possible begins

希望你喜欢这里。有问题,请提问,或搜索现有帖子。

真诚、友善、团结、专业,共建你我引以为荣之社区。《常见问题解答》

子枫
子枫 [Rainy] 08-30 10:09

通过google接口获取经纬度和地址

开发调优

<pre class="brush:php;toolbar:false">&nbsp;&nbsp;&nbsp;&nbsp;$(&#39;.get_location&#39;).on(&#39;click&#39;,function(){ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;findLatLonFromIP().then( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(value)&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;lat&nbsp;=&nbsp;value.lat &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;lng&nbsp;=&nbsp;value.lng &nbsp;&nbsp;&nbsp;

320

子枫
子枫 [Rainy] 08-30 09:01

tp51打印sql

开发调优

<p><span style="color: rgb(197, 200, 198); font-family: &quot;Source Code Pro&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Anonymous Pro&quot;, &quot;Droid Sans Mono&quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, sans-serif; font-size: 14px; white-space: pre; background-color: rgb(29, 31, 33);">-&gt;fetchSql(</span><span class="hljs-literal" style="box-sizing: border-box; outline: 0px; margin: 0px; pad

274

子枫
子枫 [Rainy] 08-24 14:10

分享几个可免费使用的网站CDN加速服务

开发调优

<p style="margin-top: 0px; margin-bottom: 18px; padding: 0px; box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; line-height: 26px; color: rgb(96, 98, 102); font-family: &quot;Joe Font&quot;; font-size: 15px; white-space: normal; background-color: rgb(255, 255, 255);"><span class="joe_message info" style="margin: 0px; padding: 8px 15px; box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; display: block; position: relative; border-left: 4

394

子枫
子枫 [Rainy] 07-09 11:00

layui table 的宽度超出自动隐藏

开发调优

<pre class="brush:php;toolbar:false">td{ min-width:&nbsp;150px; max-width:&nbsp;200px; /*&nbsp;超出长度隐藏&nbsp;*/ overflow:&nbsp;hidden; text-overflow:&nbsp;ellipsis; white-space:&nbsp;nowrap; }</pre><p><br/></p>

616

子枫
子枫 [Rainy] 07-07 12:05

TP5.1下实现手动断开mysql数据库链接操作

开发调优

<p>参考文章 :<a href="https://blog.csdn.net/qq_40364437/article/details/107388997" _src="https://blog.csdn.net/qq_40364437/article/details/107388997">https://blog.csdn.net/qq_40364437/article/details/107388997</a> </p><p><br/></p>

288

子枫
子枫 [Rainy] 07-07 10:37

定时任务出现 -Query类的close方法不存在

子枫cmsX2

<p><img src="/public/upload/image/20220707/1657161085261712.png" title="1657161085261712.png" alt="image.png"/></p><p>出啊先这个问题是因为 thinkphp官方的query类没有close方法</p><p><br/></p><p><br/></p><p>我们只需要修改query类即可</p><p>找到文件<br/></p><p><img src="/public/upload/image/20220707/1657161171753638.png" title="1657161171753638.png" alt="image.png"/></p><p>打开query.php</p><p>添加close方法</p><p><img src="/public/upload/image/20220707/1657161209924101.png" title="1657161209924101.png" alt="image.png"/></p><pre class="bru

260

子枫
子枫 [Rainy] 07-04 10:07

tp51验证码的使用

开发调优

<p>生成</p><pre class="brush:php;toolbar:false"> use&nbsp;think\captcha\Captcha; &nbsp;public&nbsp;function&nbsp;verify(){ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$config&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;[ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;验证码字体大小 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;fontSize&#39;&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;&nbsp;&nbsp;&nbsp;30,&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&n

259

子枫
子枫 [Rainy] 07-04 10:05

调用省市区联动

开发调优

<pre class="brush:php;toolbar:false"> public&nbsp;function&nbsp;change_select_json(){ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$type&nbsp;=&nbsp;input(&#39;type&#39;,&#39;&#39;); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$id&nbsp;=&nbsp;input(&#39;id&#39;,&#39;&#39;); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($type==1){ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$where[]&nbsp;=&nbsp;[&#39;province_num&#39;,&#39;=&#39;,$id]; &nbsp;&nbsp;&nb

245

子枫
子枫 [Rainy] 06-27 16:54

centos镜像下载

开发调优

<p>下载地址:&nbsp;&nbsp;<a href="http://archive.kernel.org/centos-vault/altarch/7.6.1810/isos/aarch64/" _src="http://archive.kernel.org/centos-vault/altarch/7.6.1810/isos/aarch64/">http://archive.kernel.org/centos-vault/altarch/7.6.1810/isos/aarch64/</a> </p><p><br/></p>

260

子枫
子枫 [Rainy] 06-27 13:19

给出一个日期,判断是否是某个节气,或某节气的后

开发调优

<pre class="brush:php;toolbar:false"> function&nbsp;getJieQi($_year,$month,$day)&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$year&nbsp;=&nbsp;substr($_year,-2)+0;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$coefficient&nbsp;=&nbsp;array(&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array(5.4055,2019,-1),//小寒&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&

274

子枫
子枫 [Rainy] 06-13 15:01

哔哩哔哩视频av和bv互转 PHP源码

开发调优

<pre class="brush:php;toolbar:false"> class&nbsp;Bilibili{ &nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;$table&nbsp;=&nbsp;&quot;fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF&quot;; &nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;$tr&nbsp;=&nbsp;[]; &nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;$s&nbsp;=&nbsp;[11,&nbsp;10,&nbsp;3,&nbsp;8,&nbsp;4,&nbsp;6]; &nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;$xor&nbsp;=&nbsp;177451812; &nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;$add&nbsp;=&nbsp;8728348608; &nbsp;&nb

338

子枫
子枫 [Rainy] 06-09 12:01

mac使用npm安装包,报没有权限

开发调优

<p>执行代码</p><pre class="brush:php;toolbar:false">npm&nbsp;install&nbsp;-g&nbsp;yo&nbsp;generator-code</pre><p>时报错<br/></p><pre class="brush:php;toolbar:false">(base)&nbsp;zf@192&nbsp;test&nbsp;%&nbsp;npm&nbsp;install&nbsp;-g&nbsp;yo&nbsp;generator-code npm&nbsp;ERR!&nbsp;code&nbsp;EACCES npm&nbsp;ERR!&nbsp;syscall&nbsp;mkdir npm&nbsp;ERR!&nbsp;path&nbsp;/usr/local/lib/node_modules/generator-code npm&nbsp;ERR!&nbsp;errno&nbsp;-13 npm&nbsp;ERR!&nbsp;Error:&nbsp;EACCES:&nbsp;permission&nbsp;de

302

子枫
子枫 [Rainy] 06-08 16:11

shell 判断进程是否关闭,如果关闭,自动启用

开发调优

<pre class="brush:php;toolbar:false">#!&nbsp;/bin/bash nginx_procnum=`ps&nbsp;-ef&nbsp;|&nbsp;grep&nbsp;&quot;nginx&quot;&nbsp;|&nbsp;grep&nbsp;-v&nbsp;grep&nbsp;|&nbsp;wc&nbsp;-l` mysql_procnum=`ps&nbsp;-ef&nbsp;|&nbsp;grep&nbsp;&quot;mysqld&quot;&nbsp;|&nbsp;grep&nbsp;-v&nbsp;grep&nbsp;|&nbsp;wc&nbsp;-l` redis_procnum=`ps&nbsp;-ef&nbsp;|&nbsp;grep&nbsp;&quot;redis&quot;&nbsp;|&nbsp;grep&nbsp;-v&nbsp;grep&nbsp;|&nbsp;wc&nbsp;-l` memcached_procnum=`ps&nbsp;-ef&nbsp;|&nbsp;grep&nbsp;&quot;mem

240

子枫
子枫 [Rainy] 06-07 10:41

linux命令 set -ex 什么意思

开发调优

<p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium; white-space: normal;">-e 脚本中的命令一旦运行失败就终止脚本的执行<br/>-x 用于显示出命令与其执行结果(默认shell脚本中只显示执行结果</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium; white-space: normal;">+ex表示不终止错误,不显示结果</p><p><br/></p>

312

子枫
子枫 [Rainy] 05-31 19:51

linux杀死进程命令kill

开发调优

<p>kill&nbsp; PID</p><p><br/></p>

307