摘要:
<?php namespace app\admin\model; use think\Model; use think\Db; class CategoryServe extends Model { // 表名 protected $name = 'category_serve'; // 自动写入时 阅读全文
摘要:
$code = $this->request->post('code'); $appid = '你的appid'; $appsecret = '你的secret'; $weixin = getJson('https://api.weixin.qq.com/sns/jscode2session?app 阅读全文
摘要:
我是使用apache 碰到这个问题的 就是apache 中的省略入口文件没有配置好 <IfModule mod_rewrite.c>Options +FollowSymlinks -MultiviewsRewriteEngine onRewriteCond %{REQUEST_FILENAME} ! 阅读全文
摘要:
1, 使用不去验证数据$stream_opts = [ "ssl" => [ "verify_peer" => false, "verify_peer_name" => false, ] ]; $user_info = json_decode(file_get_contents($user_info 阅读全文
摘要:
/^([a-zA-Z]+=[a-zA-Z0-9]+,)*[a-zA-Z]+=[a-zA-Z0-9]+$/.test('a=a,af=sasfd,b=asdfJH,asa=fdc,c=sdf') 阅读全文
摘要:
SELECT S1.Sname,S1.sex FROM student AS S1, student AS S2 WHERE S1.age = S2.age AND S1.Sname <> S2.Sname GROUP BY S1.Sname ORDER BY S1.age 学生表中 求出 年龄相同 阅读全文
摘要:
模型层方面 设置表名 主见名称 字段 protected $name = 'recruit'; protected $pk = 'recruit_id'; protected $field = []; // 查找详情数据 public static function getUserOrderDeta 阅读全文
摘要:
1,C:\Users\Administrator\AppData\Roaming\JetBrains\PhpStorm2023.3 按照大概文件位置进行处理 2,找到phpstorm64.exe.vmoptions 文件 把下面这段东西复制进去 至于为啥就打开,我不知道 哈哈哈哈 管他呢 -serv 阅读全文
摘要:
1,match (){}; 数据进行匹配,可以是表达式,可以是字符,数字,字符串,方法,可以多个进行匹配。 2,命名参数 php8.0 以上才有的功能,书写参数的时候位置可以是不固定的, 可以进行位置互换。 function test($name,$age=10,$sex='男'){ echo $n 阅读全文
摘要:
1,在 PHP 中,我们可以使用 new static() 结合私有构造函数和一个静态方法来实现单例模式。以下是一个简单的例子 class Singleton { // 私有化构造函数,防止外部直接实例化 private function __construct() {} // 静态变量用于存储单一 阅读全文