上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 97 下一页
摘要: PHP 使用ip链接需要注意的问题 能用内网的就用内网 因为内网不占带宽 外网传输要占带宽的 比方说链接数据库读取 内网就不用占带宽 阅读全文
posted @ 2020-11-27 18:59 newmiracle宇宙 阅读(76) 评论(0) 推荐(0) 编辑
摘要: // 单条插入 for ($i = 0; $i < 1000; $i++) { $name = rand(1000, 9999); $email = rand(1000, 9999); $message = rand(1000, 9999); $insertdata = array('name' = 阅读全文
posted @ 2020-11-25 20:56 newmiracle宇宙 阅读(363) 评论(0) 推荐(0) 编辑
摘要: phpredis 嵌套消息队列的方法 public function testxiaoxiduilie() { $redis = \RedisClient::getInstance(); $redis->flushall(); $key1 = "duilieitem1"; $redis->Lpush 阅读全文
posted @ 2020-11-25 12:17 newmiracle宇宙 阅读(146) 评论(0) 推荐(0) 编辑
摘要: PHP TCP处理大数据要注意的问题 1个tcp上 处理数据最好不要超过1分钟 不然会出现各种坑 如果超过1分钟就分批(分成多个tcp请求)处理 或者不要在tcp上处理 阅读全文
posted @ 2020-11-24 18:01 newmiracle宇宙 阅读(166) 评论(0) 推荐(0) 编辑
摘要: swoole hyperf CPU密集计算初体验 class IndexController extends AbstractController { public function index() { $ss=0; for($i=0;$i<1000000000;$i++){ $ss+=$i; } 阅读全文
posted @ 2020-11-24 11:23 newmiracle宇宙 阅读(245) 评论(0) 推荐(0) 编辑
摘要: PHP 换行编码问题 PHP_EOL 这个取决于当前系统的来决定换行符 如果linux 执行 那就是linux下的换行符 如果用win打开是不识别的 如果要win打开文件有换行 那就用win换行符写死 换行符必须和变量分离 $ss = __DIR__.'/test.txt'; $filename=3 阅读全文
posted @ 2020-11-24 10:05 newmiracle宇宙 阅读(131) 评论(0) 推荐(0) 编辑
摘要: swoole hypert 安装方法 先要安装2个php扩展插件 mbstring和redis mbstring php下载包里 然后就可以了 /usr/local/php7.3/bin/php /usr/local/bin/composer create-project hyperf/hyperf 阅读全文
posted @ 2020-11-23 18:16 newmiracle宇宙 阅读(230) 评论(0) 推荐(0) 编辑
摘要: <?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; header("Content-type: text/html; charset=utf-8"); require_once __DIR__.'/s 阅读全文
posted @ 2020-11-23 16:08 newmiracle宇宙 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 下载微信视频号视频的方法(只有安卓有效) 进入文件管理 搜索finder_video 然后先全部删掉 然后按照时间排序下 找到最近的就行 后缀名加个mp4 (可能需要深度搜索) 阅读全文
posted @ 2020-11-19 16:11 newmiracle宇宙 阅读(1422) 评论(0) 推荐(0) 编辑
摘要: php is_file is_dir需要注意的问题 如果有中文 必须转码到gbk 后判断 $file_path = __DIR__ . '/324234/' . $logname . 'log.log'; $file_path = iconv('UTF-8', 'GBK', $file_path); 阅读全文
posted @ 2020-11-19 14:40 newmiracle宇宙 阅读(156) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 97 下一页