摘要: 要在Ubuntu上安装Mosquitto并进行配置,你可以按照以下步骤进行操作: 1. 打开终端。 2. 更新软件包列表,使用以下命令: ``` sudo apt update ``` 3. 安装Mosquitto包,使用以下命令: ``` sudo apt install mosquitto `` 阅读全文
posted @ 2023-07-01 09:22 xingduo 阅读(1494) 评论(0) 推荐(0)
摘要: ``` function put_by_form($url, $data, $header = array(), $timeout = 10) { $ch = curl_init(); if (!empty($data)) { curl_setopt($ch, CURLOPT_POSTFIELDS, 阅读全文
posted @ 2023-06-29 16:33 xingduo 阅读(35) 评论(0) 推荐(0)
摘要: 在 PHP 中使用 cURL 上传文件至接口,你可以通过 `CURLOPT_POSTFIELDS` 选项来设置文件的内容。以下是一个示例: ```php function uploadFile($url, $filePath, $fieldName) { $ch = curl_init($url); 阅读全文
posted @ 2023-06-29 08:57 xingduo 阅读(1980) 评论(0) 推荐(0)
摘要: ```php class FileUploader { private $targetDirectory; private $allowedExtensions; private $maxFileSize; public function __construct($targetDirectory, 阅读全文
posted @ 2023-06-29 08:53 xingduo 阅读(35) 评论(0) 推荐(0)
摘要: 1. 使用 `Object.keys()` 方法检查对象的键值对数量: ```javascript function isObjectEmpty(obj) { return Object.keys(obj).length 0; } // 示例用法 const obj1 = {}; console.l 阅读全文
posted @ 2023-06-19 13:49 xingduo 阅读(96) 评论(0) 推荐(0)
摘要: 要设置Git忽略文件,你可以使用一个名为.gitignore的特殊文件。在这个文件中,你可以列出需要Git忽略的文件、文件夹、或者匹配模式。当Git执行操作时,它会自动忽略这些被列出的文件。 1. 在你的项目根目录下创建一个名为.gitignore的文件。 2. 打开.gitignore文件,然后逐 阅读全文
posted @ 2023-05-18 14:52 xingduo 阅读(1647) 评论(0) 推荐(0)
摘要: git全局设置 git config --global user.name "xxxxxx" git config --global user.email "xxxxxx" 创建 git 仓库 mkdir custom cd custom git init touch README.md git a 阅读全文
posted @ 2023-05-18 14:37 xingduo 阅读(21) 评论(0) 推荐(0)
摘要: {field:'plateNoPicUri', title: '图片' ,width:"10%" ,templet:function(data){ if("" == data.plateNoPicUri || null == data.plateNoPicUri) return ""; var su 阅读全文
posted @ 2023-04-24 17:06 xingduo 阅读(574) 评论(0) 推荐(0)
摘要: const timestampToTime= (timestamp) => { const date = new Date(timestamp * 1000); const year = date.getFullYear(); const month = (date.getMonth() + 1). 阅读全文
posted @ 2023-04-20 11:56 xingduo 阅读(204) 评论(0) 推荐(0)
摘要: private function formatISODate($dateTime) { $date = date("Y-m-d", strtotime($dateTime)); $time = date("H:i:s.000", strtotime($dateTime)); return $date 阅读全文
posted @ 2023-04-04 10:34 xingduo 阅读(384) 评论(0) 推荐(0)