擅长:python、mysql、java
<p>您可以从终端运行SimpleHTTPServer</p>
<p>如果您想托管<strong>桌面的文件,那么</p>
<pre><code>cd Desktop
</code></pre>
<p>然后呢</p>
<pre><code>python -m SimpleHTTPServer 8001
</code></pre>
<p>将浏览器指向本地主机:8001。你知道吗</p>
<p>从Python文档:</p>
<blockquote>
<p>This serves the files relative to the current directory.</p>
</blockquote>