<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 1、寫系統錯誤日志(方便調試) ``` /// <summary> /// 日志部分(為方便技術人員調試) /// </summary> /// <param name="folder">文件夾</param> /// <param name="type">操作類型</param> /// <param name="content">內容</param> public static void WriteLogsE(string folder, string type, string content) { string path = AppDomain.CurrentDomain.BaseDirectory; if (!string.IsNullOrEmpty(path)) { path = AppDomain.CurrentDomain.BaseDirectory + folder; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } path = path + "\\" + DateTime.Now.ToString("yyyyMMdd"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } path = path + "\\" + DateTime.Now.ToString("HH") + ".txt"; if (!File.Exists(path)) { FileStream fs = File.Create(path); fs.Close(); } if (File.Exists(path)) { StreamWriter sw = new StreamWriter(path, true, System.Text.Encoding.Default); sw.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + " >> " + type + " >> " + content); sw.WriteLine("-----------------------------------------------------------"); sw.Close(); } } } ``` ## 使用 ``` try { aliyunsms a = new aliyunsms(); string c=a.send("13700605160", "777", "999"); LogsHelper.WriteLogsE("log", "發送短信", c); } catch (Exception err) { LogsHelper.WriteLogsE("log", "發短信錯誤", err.Message); throw; } ``` ## 使用效果 系統會在當前目錄下建目錄 并寫錯誤信息 ``` 2018-09-27 17:34:44.049 >> 用戶登錄 >> Specified signature is not matched with our calculation. server string to sign is:GET&%2F&AccessKeyId%3DLTAIqVC3UPyCJaKB%26Action%3DSendSms%26Format%3DJSON%26OutId%3Dok%26PhoneNumbers%3D13700605160%26RegionId%3Dcn-hangzhou%26SignName%3D%25E4%25B8%25AD%25E5%259B%25BD%25E7%25BF%25BC%25E9%2580%259A%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3Db59c5d45-5d85-4138-a1ec-023f2596d515%26SignatureVersion%3D1.0%26TemplateCode%3D777%26TemplateParam%3D999%26Timestamp%3D2018-09-27T09%253A34%253A43Z%26Version%3D2017-05-25 ----------------------------------------------------------- 2018-09-27 17:36:02.382 >> 發送短信 >> Specified signature is not matched with our calculation. server string to sign is:GET&%2F&AccessKeyId%3DLTAIqVC3UPyCJaKB%26Action%3DSendSms%26Format%3DJSON%26OutId%3Dok%26PhoneNumbers%3D13700605160%26RegionId%3Dcn-hangzhou%26SignName%3D%25E4%25B8%25AD%25E5%259B%25BD%25E7%25BF%25BC%25E9%2580%259A%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3D2245e9a6-1382-46d2-8fcd-8d67eec86e03%26SignatureVersion%3D1.0%26TemplateCode%3D777%26TemplateParam%3D999%26Timestamp%3D2018-09-27T09%253A36%253A01Z%26Version%3D2017-05-25 ----------------------------------------------------------- 2018-09-27 17:36:42.228 >> 發送短信 >> JSON參數不合法 ----------------------------------------------------------- 2018-09-27 17:36:58.656 >> 發送短信 >> JSON參數不合法 ----------------------------------------------------------- 2018-09-27 17:36:59.323 >> 發送短信 >> JSON參數不合法 ----------------------------------------------------------- 2018-09-27 17:36:59.931 >> 發送短信 >> JSON參數不合法 ----------------------------------------------------------- 2018-09-27 17:37:00.504 >> 發送短信 >> JSON參數不合法 ----------------------------------------------------------- 2018-09-27 17:37:01.074 >> 發送短信 >> JSON參數不合法 ----------------------------------------------------------- ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看