admin 发表于 2020-11-22 14:46:43

原创:windows下ThinkPHP6.0框架一次性安装成功教程,错误解决

<p>官方的安装流程缺三少四,你如果按官方的一定不会一次安装成功,要东查西查,拼拼凑凑能安装成功就算不错的了。现将ThinkPHP6.0框架一次成功流程总结如下,让大家少走弯路。</p><p>一、进入你的PHP安装目录,要确保PHP版本大于7.1,如果你不知道 你的PHP安装在哪,你可以搜索php.exe文件,找到它就找到他的安装目录了。我的目录是D:\phpstudy_pro\Extensions\php\php7.3.4nts。</p><p>二、开始-》运行&nbsp; &nbsp;输入CMD回车,打开命令行 ,执行命令,cd&nbsp; D:\phpstudy_pro\Extensions\php\php7.3.4nts&nbsp; &nbsp;这里要改成你的目录。</p><p>三、命令行在这个目录下执行以下三条命令,用复制 粘贴最好。</p><p style="margin-bottom: 19.7969px; color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;">打开命令行并依次执行下列命令安装最新版本的 Composer:</p><div class="bd-clipboard" style="position: relative; float: right; color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;"><span class="btn-clipboard" title="" data-original-title="复制到剪贴板" style="position: absolute; top: 6px; right: 30px; z-index: 10; display: block; padding: 3px 6px; font-size: 12px; color: rgb(129, 138, 145); cursor: pointer; background-color: transparent; border-radius: 0.25em; width: 3em;">复制</span></div><pre style="overflow-y: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14px; padding: 19.7969px 66px 19.7969px 33px; margin-bottom: 1.6em; line-height: 1.6; color: rgb(51, 51, 51); word-break: break-all; background-color: rgb(247, 247, 247); border: none; border-radius: 0px; position: relative; max-width: 100%; tab-size: 4;"><code class="lang-bash" style="font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: inherit; color: inherit; background-color: transparent; border-radius: 0px;">php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
</code></pre><div class="bd-clipboard" style="position: relative; float: right; color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;"><span class="btn-clipboard" title="" data-original-title="复制到剪贴板" style="position: absolute; top: 6px; right: 30px; z-index: 10; display: block; padding: 3px 6px; font-size: 12px; color: rgb(129, 138, 145); cursor: pointer; background-color: transparent; border-radius: 0.25em; width: 3em;">复制</span></div><pre style="overflow-y: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14px; padding: 19.7969px 66px 19.7969px 33px; margin-bottom: 1.6em; line-height: 1.6; color: rgb(51, 51, 51); word-break: break-all; background-color: rgb(247, 247, 247); border: none; border-radius: 0px; position: relative; max-width: 100%; tab-size: 4;"><code class="lang-bash" style="font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: inherit; color: inherit; background-color: transparent; border-radius: 0px;">php composer-setup.php
</code></pre><div class="bd-clipboard" style="position: relative; float: right; color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;"><span class="btn-clipboard" title="" data-original-title="复制到剪贴板" style="position: absolute; top: 6px; right: 30px; z-index: 10; display: block; padding: 3px 6px; font-size: 12px; color: rgb(129, 138, 145); cursor: pointer; background-color: transparent; border-radius: 0.25em; width: 3em;">复制</span></div><pre style="overflow-y: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14px; padding: 19.7969px 66px 19.7969px 33px; margin-bottom: 1.6em; line-height: 1.6; color: rgb(51, 51, 51); word-break: break-all; background-color: rgb(247, 247, 247); border: none; border-radius: 0px; position: relative; max-width: 100%; tab-size: 4;"><code class="lang-bash" style="font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: inherit; color: inherit; background-color: transparent; border-radius: 0px;">php -r "unlink('composer-setup.php');"</code></pre><p style="margin-bottom: 19.7969px; color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;">上述 3 条命令的作用依次是:</p><ol style="margin-bottom: 19.7969px; color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;"><li>下载安装脚本 -&nbsp;<code style="font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14.4px; padding: 2px 4px; color: inherit; background-color: rgba(0, 0, 0, 0.04); border-radius: 4px;">composer-setup.php</code>&nbsp;- 到当前目录。</li><li>执行安装过程。</li><li>删除安装脚本。</li></ol><p><font color="#333333" face="-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif">四、</font><span style="color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;">在 PHP 安装目录下(也就是上面说的目录)新建一个&nbsp;</span><code style="color: inherit; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14.4px; padding: 2px 4px; background-color: rgba(0, 0, 0, 0.04); border-radius: 4px;">composer.bat</code><span style="color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;">&nbsp;</span><span style="color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;">文件,并将下列代码保存到此文件中。</span></p><div class="bd-clipboard" style="position: relative; float: right; color: rgb(51, 51, 51); font-family: -apple-system, system-ui, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;"><span class="btn-clipboard" title="" data-original-title="复制到剪贴板" style="position: absolute; top: 6px; right: 30px; z-index: 10; display: block; padding: 3px 6px; font-size: 12px; color: rgb(129, 138, 145); cursor: pointer; background-color: transparent; border-radius: 0.25em; width: 3em;">复制</span></div><pre style="overflow-y: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14px; padding: 19.7969px 66px 19.7969px 33px; margin-bottom: 1.6em; line-height: 1.6; color: rgb(51, 51, 51); word-break: break-all; background-color: rgb(247, 247, 247); border: none; border-radius: 0px; position: relative; max-width: 100%; tab-size: 4;"><code class="lang-bash" style="font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: inherit; color: inherit; background-color: transparent; border-radius: 0px;"><span class="label label-primary">@php</span> "%~dp0composer.phar" %*</code></pre><p>然后在命令行下运行一下<span style="background-color: rgba(0, 0, 0, 0.04); font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14.4px;">composer.bat文件。</span></p><p><span style="color: rgb(51, 51, 51); font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">尊重知识产权,转载请注明并复制本段,一元复始技术论坛原创</span><a href="http://www.1rmb.net/" target="_blank" title="一元复始技术论坛" style="font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">http://www.1rmb.net</a><span style="color: rgb(51, 51, 51); font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">.</span><span style="background-color: rgba(0, 0, 0, 0.04); font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14.4px;"><br></span></p><p><span style="background-color: rgba(0, 0, 0, 0.04); font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 14.4px;">五、</span><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><span style="background-color: rgb(254, 254, 242);">进行composer的全局安装,目的是让你可以在你网站根目录下使用composer命令</span></font></p><p><font face="Verdana, Arial, Helvetica, sans-serif"><span style="background-color: rgb(254, 254, 242);"><font size="4">先设置PATH路径:右键点击&nbsp; &nbsp;</font><font size="7">&nbsp;</font></span></font><font size="4"><span style="background-color: rgb(254, 254, 242); font-family: Verdana, Arial, Helvetica, sans-serif;">计算机-&gt;属性-&gt;高级系统设置-&gt;环境变量-&gt;系统变量&nbsp; &nbsp; &nbsp;将&nbsp;</span><span style="background-color: rgb(254, 254, 242); font-family: Verdana, Arial, Helvetica, sans-serif;">Path的值修改为 php.exe的绝对路径,就是上面说的目录</span></font></p><p><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><span style="background-color: rgb(254, 254, 242);">然后在刚才的命令窗口执行以下两条</span></font></p><p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; background-color: rgb(254, 254, 242);">composer config -gl repo.packagist</span><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><span style="background-color: rgb(254, 254, 242);"><br></span></font></p><p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; background-color: rgb(254, 254, 242);"><br></span></p><pre style="padding: 0px; color: rgb(0, 0, 0); font-size: 13px; background-color: rgb(254, 254, 242);"><code class="lang-bash hljs">composer config -g repo.packagist composer https://packagist.phpcomposer.com</code></pre><div style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);"><font size="4"><br></font></div><div style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);"><font size="4">六、此步以下的操作在命令行下,CD到你的网站根目录下操作。我的是E:\WWW\TH</font></div><div style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);"><font size="4">&nbsp;&nbsp;</font></div><div style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);"><font size="4">先执行:</font><span style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); color: rgb(91, 192, 222);">composer config </span><span class="token operator" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">-</span><span style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); color: rgb(91, 192, 222);">g repo</span><span class="token punctuation" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(153, 153, 153);">.</span><span style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); color: rgb(91, 192, 222);">packagist composer https</span><span class="token punctuation" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(153, 153, 153);">:</span><span class="token operator" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span><span class="token operator" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span><span style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); color: rgb(91, 192, 222);">mirrors</span><span class="token punctuation" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(153, 153, 153);">.</span><span style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); color: rgb(91, 192, 222);">aliyun</span><span class="token punctuation" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(153, 153, 153);">.</span><span style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); color: rgb(91, 192, 222);">com</span><span class="token operator" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span><span style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; background-color: rgb(249, 250, 250); color: rgb(91, 192, 222);">composer</span><span class="token operator" style="font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; white-space: pre; box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span></div><div style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(254, 254, 242);"><br></div><p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: large; background-color: rgb(254, 254, 242);">这一步的作用是将THINKPHP的安装下载位置定位到阿里云,要不然默认的服务器在国外,而且被墙,你根本 安装不成功。</span><br></p><p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: large; background-color: rgb(254, 254, 242);"><br></span></p><p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: large; background-color: rgb(254, 254, 242);">七、执行安装命令有两条,选一条即可。</span></p><p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: large; background-color: rgb(254, 254, 242);">稳定版安装:</span></p><pre style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 15px; margin-bottom: 14px; line-height: 1.45; padding: 16px; overflow-y: auto; background-color: rgb(249, 250, 250); border: 1px solid rgb(222, 217, 217); border-radius: 3px; color: rgb(82, 82, 82);"><code class="ಠhighlight-container" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; display: inline; border-radius: 4px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; word-break: break-all; white-space: pre; line-height: inherit; max-width: 100%; overflow: initial; border: none; tab-size: 4;">composer -vvv create<span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">-</span>project topthink<span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span>think tp</code></pre><p>开发版安装:</p><pre style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 15px; margin-bottom: 14px; line-height: 1.45; padding: 16px; overflow-y: auto; background-color: rgb(249, 250, 250); border: 1px solid rgb(222, 217, 217); border-radius: 3px; color: rgb(82, 82, 82);"><code class="ಠhighlight-container" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; display: inline; border-radius: 4px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; word-break: break-all; white-space: pre; line-height: inherit; max-width: 100%; overflow: initial; border: none; tab-size: 4;">composer -vvv create<span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">-</span>project topthink<span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span>think<span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">=</span><span class="token number" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(153, 0, 85);">6.0</span><span class="token punctuation" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(153, 153, 153);">.</span>x<span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">-</span>dev tp</code></pre><p>以上两条与官网不同是加了-vvv,作用是实时查看安装下载的进度。我第一次安装时就因为看不到进度,又等的时间过长,关闭了三次。才找到这个命令。</p><p><span style="color: rgb(51, 51, 51); font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">尊重知识产权,转载请注明并复制本段,一元复始技术论坛原创</span><a href="http://www.1rmb.net/" target="_blank" title="一元复始技术论坛" style="font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">http://www.1rmb.net</a><span style="color: rgb(51, 51, 51); font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">.</span><br></p><p>八、测试运行</p><p style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; margin-top: 20px; margin-bottom: 20px; line-height: 30px; font-family: &quot;IBM Plex Mono&quot;, &quot;Space Grotesk&quot;, &quot;Roboto Slab&quot;, &quot;Microsoft YaHei&quot;, sans-serif; font-size: 17px; color: rgb(82, 82, 82);">命令行下,进入THINKPHP的安装目录也就是你的网站根目录,依次执行</p><div class="ಠcopy-code-container" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; position: relative; color: rgb(82, 82, 82); font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, serif; font-size: 15px;"><pre style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; margin-bottom: 14px; line-height: 1.45; padding: 16px; overflow-y: auto; background-color: rgb(249, 250, 250); border: 1px solid rgb(222, 217, 217); border-radius: 3px;"><code class="ಠhighlight-container" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; display: inline; border-radius: 4px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; word-break: break-all; white-space: pre; line-height: inherit; max-width: 100%; overflow: initial; border: none; tab-size: 4;">cd tp

</code></pre><pre style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; margin-bottom: 14px; line-height: 1.45; padding: 16px; overflow-y: auto; background-color: rgb(249, 250, 250); border: 1px solid rgb(222, 217, 217); border-radius: 3px;"><code class="ಠhighlight-container" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; display: inline; border-radius: 4px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; word-break: break-all; white-space: pre; line-height: inherit; max-width: 100%; overflow: initial; border: none; tab-size: 4;">php think run</code></pre></div><p>官方的手册中,没有cd tp这条命令,直接让你执行php think run,你肯定不会成功。</p><p style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; margin-top: 20px; margin-bottom: 20px; line-height: 30px; font-family: &quot;IBM Plex Mono&quot;, &quot;Space Grotesk&quot;, &quot;Roboto Slab&quot;, &quot;Microsoft YaHei&quot;, sans-serif; font-size: 17px; color: rgb(82, 82, 82);">在浏览器中输入地址:</p><div class="ಠcopy-code-container" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; position: relative; color: rgb(82, 82, 82); font-family: &quot;Helvetica Neue&quot;, NotoSansHans-Regular, AvenirNext-Regular, arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft Yahei&quot;, &quot;WenQuanYi Micro Hei&quot;, serif; font-size: 15px;"><pre style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; margin-bottom: 14px; line-height: 1.45; padding: 16px; overflow-y: auto; background-color: rgb(249, 250, 250); border: 1px solid rgb(222, 217, 217); border-radius: 3px;"><code class="ಠhighlight-container" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 1em; display: inline; border-radius: 4px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; word-break: break-all; white-space: pre; line-height: inherit; max-width: 100%; overflow: initial; border: none; tab-size: 4;">http<span class="token punctuation" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased;">:</span><span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span><span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span>localhost<span class="token punctuation" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased;">:</span><span class="token number" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(153, 0, 85);">8000</span><span class="token operator" style="box-sizing: inherit; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; color: rgb(154, 110, 58); background: rgba(255, 255, 255, 0.5);">/</span></code></pre></div><p>会看到下面的内容,安装成功。&nbsp; &nbsp;这才是真正流程顺畅的安装教程,一步一步照做,保证安装成功。</p><p><think id="ee9b1aa918103c4fc" parse="1" style="padding: 0px; margin: 0px; color: rgb(51, 51, 51); font-family: &quot;Century Gothic&quot;, &quot;Microsoft yahei&quot;; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: block; overflow: hidden;"></think></p><div style="padding: 24px 48px; margin: 0px; color: rgb(51, 51, 51); font-family: &quot;Century Gothic&quot;, &quot;Microsoft yahei&quot;; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><h1 style="padding: 0px; margin: 0px 0px 12px; font-size: 100px; font-weight: normal;">:) 2020新春快乐</h1><p style="padding: 0px; margin: 0px; line-height: 1.6em; font-size: 42px;">ThinkPHP V6.0.2<br style="padding: 0px; margin: 0px;"><span style="padding: 0px; margin: 0px; font-size: 30px;">14载初心不改 - 你值得信赖的PHP框架</span></p><span style="padding: 0px; margin: 0px; font-size: 25px;">[ V6.0 版本由<span>&nbsp;</span><a href="https://www.yisu.com/" target="yisu" style="padding: 0px; margin: 0px; color: rgb(46, 92, 213); cursor: pointer; text-decoration: none;">亿速云</a><span>&nbsp;</span>独家赞助发布 ]</span></div><div style="padding: 24px 48px; margin: 0px; color: rgb(51, 51, 51); font-family: &quot;Century Gothic&quot;, &quot;Microsoft yahei&quot;; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><span style="font-size: 16px; font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">尊重知识产权,转载请注明并复制本段,一元复始技术论坛原创</span><a href="http://www.1rmb.net/" target="_blank" title="一元复始技术论坛" style="font-size: 16px; font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">http://www.1rmb.net</a><span style="font-size: 16px; font-family: &quot;noto sans cjk sc&quot;, &quot;pingfang sc&quot;, &quot;microsoft yahei&quot;, &quot;hiragino sans gb&quot;, sans-serif;">.</span></div><div style="padding: 24px 48px; margin: 0px; color: rgb(51, 51, 51); font-family: &quot;Century Gothic&quot;, &quot;Microsoft yahei&quot;; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">如果http://localhost:8000/&nbsp; 看不到成功的页面,可以在浏览器地址栏输入你自己设置的网址试试。</div><div style="padding: 24px 48px; margin: 0px; color: rgb(51, 51, 51); font-family: &quot;Century Gothic&quot;, &quot;Microsoft yahei&quot;; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">我是用的PHPSTUDY作为服务器软件,创建网站,网址为http://th/&nbsp; &nbsp; 网站绑定目录定:E:/WWW/th/tp/public</div><div style="padding: 24px 48px; margin: 0px; color: rgb(51, 51, 51); font-family: &quot;Century Gothic&quot;, &quot;Microsoft yahei&quot;; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">输入http://localhost:8000/不行,但输入http://th/ 显示成功页面,不知道为啥了,反正是可以的。</div><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p>

页: [1]
查看完整版本: 原创:windows下ThinkPHP6.0框架一次性安装成功教程,错误解决