{"id":1244,"date":"2010-08-11T11:41:00","date_gmt":"2010-08-11T03:41:00","guid":{"rendered":""},"modified":"2013-11-25T18:22:33","modified_gmt":"2013-11-25T10:22:33","slug":"asp-net%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%bb%9d%e5%af%b9%e8%b7%af%e5%be%84%e8%bd%ac%e6%8d%a2%e6%88%90url%e7%9b%b8%e5%af%b9%e8%b7%af%e5%be%84","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/1244.html","title":{"rendered":"asp.net\u670d\u52a1\u5668\u7edd\u5bf9\u8def\u5f84\u8f6c\u6362\u6210URL\u76f8\u5bf9\u8def\u5f84"},"content":{"rendered":"<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n    \/\/\u672c\u5730\u8def\u5f84\u8f6c\u6362\u6210URL\u76f8\u5bf9\u8def\u5f84\r\n    private string urlconvertor(string imagesurl1)\r\n    {\r\n        string tmpRootDir = Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath.ToString());\/\/\u83b7\u53d6\u7a0b\u5e8f\u6839\u76ee\u5f55\r\n        string imagesurl2 = imagesurl1.Replace(tmpRootDir, &quot;&quot;); \/\/\u8f6c\u6362\u6210\u76f8\u5bf9\u8def\u5f84\r\n        imagesurl2 = imagesurl2.Replace(@&quot;\\&quot;, @&quot;\/&quot;);\r\n        return imagesurl2;\r\n    }\r\n\r\n    \/\/\u76f8\u5bf9\u8def\u5f84\u8f6c\u6362\u6210\u670d\u52a1\u5668\u672c\u5730\u7269\u7406\u8def\u5f84\r\n    private string urlconvertorlocal(string imagesurl1)\r\n    {\r\n        string tmpRootDir = Server.MapPath\r\n\r\n        (System.Web.HttpContext.Current.Request.ApplicationPath.ToString());\/\/\u83b7\u53d6\u7a0b\u5e8f\u6839\u76ee\u5f55\r\n        string imagesurl2 = tmpRootDir + imagesurl1.Replace(@&quot;\/&quot;, @&quot;\\&quot;); \/\/\u8f6c\u6362\u6210\u7edd\u5bf9\u8def\u5f84\r\n        return imagesurl2;\r\n    }\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/\u672c\u5730\u8def\u5f84\u8f6c\u6362\u6210URL\u76f8\u5bf9\u8def\u5f84 private string urlconvertor(string ima [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1244","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=1244"}],"version-history":[{"count":2,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1244\/revisions"}],"predecessor-version":[{"id":5223,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1244\/revisions\/5223"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=1244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=1244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=1244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}