ob_end_clean();
ob_start();
//Windows服务器需要加上这行。
// echo str_repeat(” “,4096);//windows
// echo str_repeat(‘ ‘, 65536); //linux
//……继续阅读 »
admin
1年前 (2023-05-13) 608浏览
0个赞
scp /www//wwwroot238.tar.gz root@39.xx.xx.xx:/www/wwwroot
……继续阅读 »
admin
1年前 (2023-04-20) 641浏览
0个赞
foreach (glob(IA_ROOT . “/logs/*.txt”) as $fn) {
if(filemtime($fn) < strtotime(‘-7 days’)){
@unlink($fn);
……继续阅读 »
admin
1年前 (2023-04-12) 545浏览
0个赞
composer报错
Changed current directory to /root/.composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
解决方案
创建一个新用户和用户组,切换到新用户去……继续阅读 »
admin
2年前 (2023-03-01) 2487浏览
1个赞
成品图:站在伟人的肩膀 改成了适合自己用的
动态存储路径
动态裁剪尺寸
html:
<div class=”form-group”>
<label class=”control-label font-weight-bold”>@lang(‘图片1R……继续阅读 »
admin
2年前 (2022-10-20) 770浏览
2个赞
在网站配置文件里
location / {
if ( !-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
……继续阅读 »
admin
2年前 (2022-06-28) 740浏览
6个赞
TP运算符
SQL运算符
例子
实际查询条件
eq
=
$map[‘id’] = array(‘eq’,100);
等效于:$map[‘id’] = 100;
neq
!=
$map[‘id’] = array(‘neq’……继续阅读 »
admin
3年前 (2021-09-10) 1015浏览
6个赞
1、压缩代码为借鉴
<?php
namespace img;
/**
* 图片压缩类:通过缩放来压缩。
* 如果要保持源图比例,把参数$percent保持为1即可。
* 即使原比例压缩,也可大幅度缩小。数码相机4M图片。也可以缩为700KB左右。如果缩小比例,则体积会更小。
*
* 结果:可保存、可直接显示。
*/
class compres……继续阅读 »
admin
3年前 (2021-08-25) 1266浏览
7个赞
任务类型
Shell脚本
执行周期
1分钟
脚本内容 网址链接换成自己的
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=3
for (( i = 0; i < 60; i=(i+step) ));……继续阅读 »
admin
3年前 (2021-08-18) 1241浏览
6个赞
数据库字符集的问题。
1、把字段改为utf8mb4_general_ci或者utf8mb4_unicode_ci
2、把thinkphp的database.php的数据库编码改为utf8mb4即可。
……继续阅读 »
admin
3年前 (2021-08-14) 908浏览
4个赞