上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 49 下一页
摘要: package main import ( "fmt" "github.com/gin-gonic/gin" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheu 阅读全文
posted @ 2024-08-15 15:16 朝阳1 阅读(58) 评论(0) 推荐(0)
摘要: 先看一个代码 $num = 0; try { echo 1 / $num; } catch (Exception $e) { echo $e->getMessage(); } 这时候得catch是无法捕获除数为0得错误 修复 <?php function errorHandler($errno, $ 阅读全文
posted @ 2024-08-12 15:39 朝阳1 阅读(39) 评论(0) 推荐(0)
摘要: 只是为了测试,具体可以参考其他开源软件的写法 原理都是动态创建数据库,导入基础sql,包含管理员信息。然后生成一个install.lock的文件,下次进来判断有这个文件,证明是安装过了 html <!DOCTYPE html> <html lang="en"> <head> <meta charse 阅读全文
posted @ 2024-08-09 17:34 朝阳1 阅读(18) 评论(0) 推荐(0)
摘要: public static function lotto($weight = array()) { $roll = sprintf("%.2f", mt_rand() / mt_getrandmax() * (array_sum($weight))); $_tmpW = 0; $rollnum = 阅读全文
posted @ 2024-08-09 16:42 朝阳1 阅读(27) 评论(0) 推荐(0)
摘要: <?php function array_remove_by_key($data, $key){ if(!array_key_exists($key, $data)){ return $data; } $keys = array_keys($data); $index = array_search( 阅读全文
posted @ 2024-08-09 14:39 朝阳1 阅读(14) 评论(0) 推荐(0)
摘要: test.php <?php if (isset($_POST['upload'])) { var_dump($_FILES); move_uploaded_file($_FILES['upfile']['tmp_name'], 'up_tmp/'.time().'.dat'); exit; } ? 阅读全文
posted @ 2024-08-09 14:16 朝阳1 阅读(32) 评论(0) 推荐(0)
摘要: <?PHP //图像处理类 class Image { private $file; //图片地址 private $width; //图片长度 private $height; //图片长度 private $type; //图片类型 private $img; //原图的资源句柄 private 阅读全文
posted @ 2024-08-09 14:11 朝阳1 阅读(28) 评论(0) 推荐(0)
摘要: <video id="videoID" src="video.mp4" poster="loadbg.jpg" 视频封面 preload="auto" x-webkit-airplay="allow" x5-video-player-type="h5" 启用H5播放器,是wechat安卓版特性 x5 阅读全文
posted @ 2024-08-09 14:10 朝阳1 阅读(126) 评论(0) 推荐(0)
摘要: 工作原理就是把你写好的 php 代码编译成 c,然后你可以将其以扩展.so的形式添加到 'php.ini' 文件中。功能稍微少一点,适合简单场景 安装解释器 https://github.com/zephir-lang/php-zephir-parser git clone https://gith 阅读全文
posted @ 2024-08-07 09:47 朝阳1 阅读(35) 评论(0) 推荐(0)
摘要: .container{ height: 300px; width: 300px; background: red; position: absolute; top:50%; left: 50%; translate:-50%-50%; } 阅读全文
posted @ 2024-07-25 10:01 朝阳1 阅读(15) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 49 下一页