<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>ThinkPHP - 标签 - 菠菜眾長</title><link>https://lruihao.cn/tags/thinkphp/</link><description>ThinkPHP - 标签 - 菠菜眾長</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>1024@lruihao.cn (Lruihao)</managingEditor><webMaster>1024@lruihao.cn (Lruihao)</webMaster><lastBuildDate>Tue, 19 Mar 2019 23:32:56 +0000</lastBuildDate><atom:link href="https://lruihao.cn/tags/thinkphp/" rel="self" type="application/rss+xml"/><item><title>宅音乐播放器</title><link>https://lruihao.cn/posts/player/</link><pubDate>Tue, 19 Mar 2019 23:32:56 +0000</pubDate><author>Lruihao</author><guid>https://lruihao.cn/posts/player/</guid><description><![CDATA[<div class="featured-image">
        <img src="/posts/player/images/index.png" referrerpolicy="no-referrer">
      </div><blockquote>
<p>宅音乐播放器，HTML5 网页播放器，集成后台管理及 API 调用，目前正在开发中，敬请关注~<br>
<a href="https://github.com/lzx8589561/zhai-music"target="_blank" rel="external nofollow noopener noreferrer">原项目<i class="fa-solid fa-external-link-alt fa-fw fa-xs ms-1 text-secondary" aria-hidden="true"></i></a> 由 <a href="https://www.ilt.me"target="_blank" rel="external nofollow noopener noreferrer">IT 技术宅<i class="fa-solid fa-external-link-alt fa-fw fa-xs ms-1 text-secondary" aria-hidden="true"></i></a> 开源，使用 thinkPHP 开发后台。 <a href="https://github.com/Lruihao/zhai-music"target="_blank" rel="external nofollow noopener noreferrer">fork 地址<i class="fa-solid fa-external-link-alt fa-fw fa-xs ms-1 text-secondary" aria-hidden="true"></i></a> 是我个人学习模仿的库，也是相当于备份源码。<br>
<em>注： 插件修改于明月浩空免费版，仅用于学习交流，无商业价值，如发现商业传播，将禁止软件的免费使用。</em></p>
</blockquote>
<h2 id="技术栈">技术栈</h2>
<ul>
<li>后端：thinkphp 5.1</li>
<li>前端：layui</li>
<li>数据库：mysql</li>
</ul>
<h2 id="演示站">演示站</h2>
<blockquote>
<p>已兼容移动端，测试账号仅供测试请勿修改密码！</p>
</blockquote>
<div class="highlight" id="id-1"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">test
</span></span><span class="line"><span class="cl">test123</span></span></code></pre></td></tr></table>
</div>
</div><ul>
<li><a href="https://player.ilt.me/"target="_blank" rel="external nofollow noopener noreferrer">https://player.ilt.me/<i class="fa-solid fa-external-link-alt fa-fw fa-xs ms-1 text-secondary" aria-hidden="true"></i></a></li>
<li><a href="https://player.lruihao.cn/"target="_blank" rel="external nofollow noopener noreferrer">https://player.lruihao.cn/<i class="fa-solid fa-external-link-alt fa-fw fa-xs ms-1 text-secondary" aria-hidden="true"></i></a></li>
</ul>
<h2 id="安装">安装</h2>
<h3 id="视频安装教程">视频安装教程</h3>
<p><a href="https://www.bilibili.com/video/av46476706"target="_blank" rel="external nofollow noopener noreferrer">https://www.bilibili.com/video/av46476706<i class="fa-solid fa-external-link-alt fa-fw fa-xs ms-1 text-secondary" aria-hidden="true"></i></a></p>
<h3 id="依赖">依赖</h3>
<ul>
<li>composer</li>
<li>php 5.6+</li>
<li>mysql 5.5+</li>
</ul>
<h3 id="步骤">步骤</h3>
<p>安装 php 依赖包</p>
<div class="highlight" id="id-2"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">composer install</span></span></code></pre></td></tr></table>
</div>
</div><p>配置数据库，配置链接数据库名以及用户名密码</p>
<div class="highlight" id="id-3"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">/config/database.php</span></span></code></pre></td></tr></table>
</div>
</div><p>创建数据库</p>
<div class="highlight" id="id-4"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">字符编码：utf8 -- UTF-8 Unicode
</span></span><span class="line"><span class="cl">导入数据库脚本，脚本位置 extend/database</span></span></code></pre></td></tr></table>
</div>
</div><h3 id="伪静态配置">伪静态配置</h3>
<h4 id="nginx">nginx</h4>
<div class="highlight" id="id-5"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">  location / {
</span></span><span class="line"><span class="cl">      index  index.htm index.html index.php;
</span></span><span class="line"><span class="cl">      #访问路径的文件不存在则重写 URL 转交给 ThinkPHP 处理
</span></span><span class="line"><span class="cl">      if (!-e $request_filename) {
</span></span><span class="line"><span class="cl">         rewrite  ^/(.*)$  /index.php?s=$1  last;
</span></span><span class="line"><span class="cl">         break;
</span></span><span class="line"><span class="cl">      }
</span></span><span class="line"><span class="cl">  }</span></span></code></pre></td></tr></table>
</div>
</div><h4 id="apache">apache</h4>
<p>项目自带 apache 静态化无需配置</p>
<h3 id="启动项目">启动项目</h3>
<ul>
<li>添加 public 为 web 根目录</li>
<li>若为 apache 服务器则默认伪静态，nginx 可自行配置伪静态</li>
</ul>
<h2 id="预览">预览</h2>
<p></p>
<h3 id="首页">首页</h3>
<p></p>
<h3 id="登陆页面">登陆页面</h3>
<p></p>
<h3 id="后台首页">后台首页</h3>
<p></p>
<h3 id="后台播放器管理页面">后台播放器管理页面</h3>
<p></p>
<h3 id="后台歌单管理页面">后台歌单管理页面</h3>
<p></p>]]></description></item></channel></rss>