📜  base64 编码用户名密码 php 示例 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:57.585000             🧑  作者: Mango

代码示例1
$auth = base64_encode($uname . ":" . $pass);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Authorization: Basic $auth",
                                              "Accept: application/json",
                                              "Content-Type: application/json"));