使用阿里云的iot进行物联网搭建使用
# 使用阿里云的mqtt
最开始官方推荐的使用这个
composer require php-mqtt/client
里面使用到的参数
在下面这个链接里面找
跑起来之后发现不兼容
composer require stomp-php/stomp-php:^5.0
这是对的
// 创建客户端连接
$client = new Client('ssl://1652498043140098.iot-amqp.cn-shanghai.aliyuncs.com:61614');
# git 放弃本地修改,直接拉取远程仓库代码
git reset --hard HEAD
git pull
# 更新线上的composer
直接使用composer update不得行的话
临时解决方案
composer install --no-dev --ignore-platform-reqs
设置阿里云镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer update --ignore-platform-reqs
编辑 (opens new window)
上次更新: 2024/12/18, 17:45:13
- 01
- 免费的在线logo设计,uugai找了我好就12-24
- 02
- Untitled12-24