{"id":759,"date":"2013-09-10T03:05:23","date_gmt":"2013-09-10T03:05:23","guid":{"rendered":"http:\/\/blog.zhukunqian.com\/?p=759"},"modified":"2013-09-10T03:05:23","modified_gmt":"2013-09-10T03:05:23","slug":"webtool%e5%85%81%e8%ae%b8%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae","status":"publish","type":"post","link":"http:\/\/blog.zhukunqian.com\/?p=759","title":{"rendered":"webtool\u5141\u8bb8\u8fdc\u7a0b\u8bbf\u95ee"},"content":{"rendered":"<p>webtool:start().\u542f\u52a8\u540e\uff0c\u65e0\u6cd5\u8fdc\u7a0b\u8bbf\u95ee\uff0c\u67e5\u770b<\/p>\n<pre class=\"brush: html; gutter: true\">start(Path,Data)-&gt;{ok,Pid}|{stop,Reason}\r\n\r\nTypes:\r\nPath = string() | standard_path\r\nData = [Port,Address,Name] | PortNumber | standard_data\r\nPort = {port,PortNumber}\r\nAddress = {bind_address,IpNumber}\r\nName = {server_name,ServerName}\r\nPortNumber = integer()\r\nIpNumber = tuple(), e.g. {127,0,0,1}\r\nServerName = string()\r\nPid = pid()\r\n\r\nUse this function to start WebTool if the default port, ip-number,servername or path can not be used.\r\n\r\nPath is the directory where the mime.types file and WebTool&#039;s own HTML files are located. By default this is webtool-&lt;vsn&gt;\/priv, and in most cases there is no need to change this. If Path is set to standard_path the default will be used.\r\n\r\nIf Data is set to PortNumber, the default data will be used for ip-number (127.0.0.1) and server name (localhost).<\/pre>\n<p>\u9700\u8981\u8bbe\u7f6ebind_address\u4e3a 0,0,0,0\u624d\u80fd\u8fdc\u7a0b\u8bbf\u95ee\u3002<\/p>\n<p>\u542f\u52a8\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>webtool:start(standard_path,[{port,8888},{bind_address,{0,0,0,0}},{server_name,&#8221;server&#8221;}]).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>webtool:start().\u542f\u52a8\u540e\uff0c\u65e0\u6cd5\u8fdc\u7a0b\u8bbf\u95ee\uff0c\u67e5\u770b start(Path &hellip;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/blog.zhukunqian.com\/?p=759\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=\/wp\/v2\/posts\/759"}],"collection":[{"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=759"}],"version-history":[{"count":2,"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=\/wp\/v2\/posts\/759\/revisions"}],"predecessor-version":[{"id":761,"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=\/wp\/v2\/posts\/759\/revisions\/761"}],"wp:attachment":[{"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=759"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.zhukunqian.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}